spec_meta_has_completed
Value
dbHasCompleted()
returns a logical scalar.
For a query initiated by DBI::dbSendQuery()
with non-empty result set,
dbHasCompleted()
returns FALSE
initially
and TRUE
after calling DBI::dbFetch()
without limit.
For a query initiated by DBI::dbSendStatement()
,
dbHasCompleted()
always returns TRUE
.
Failure modes
Attempting to query completion status for a result set cleared with
DBI::dbClearResult()
gives an error.
Specification
The completion status for a query is only guaranteed to be set to
FALSE
after attempting to fetch past the end of the entire result.
Therefore, for a query with an empty result set,
the initial return value is unspecified,
but the result value is TRUE
after trying to fetch only one row.
Similarly, for a query with a result set of length n,
the return value is unspecified after fetching n rows,
but the result value is TRUE
after trying to fetch only one more
row.
See also
Other meta specifications:
spec_get_info
,
spec_meta_bind
,
spec_meta_column_info
,
spec_meta_get_row_count
,
spec_meta_get_rows_affected
,
spec_meta_get_statement
,
spec_meta_is_valid