Generic targets select function.
Returns number of targets and array of target data in allocatable
array targets
, if query was successful.
The function returns the following error codes:
E_ALLOC
if memory allocation failed.E_DB_NO_ROWS
if no rows are returned.E_DB_PREPARE
if statement preparation failed.E_DB_TYPE
if returned columns are unexpected.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(db_type), | intent(inout) | :: | db |
Database type. |
||
type(target_type), | intent(out), | allocatable | :: | targets(:) |
Target data array. |
|
integer(kind=i8), | intent(out), | optional | :: | ntargets |
Number of selected targets. |
Iterator function that returns all targets in target
. The
statement db_stmt
must be finalised once finished.
The function returns the following error codes:
E_DB_NO_ROWS
if no more rows are returned.E_DB_PREPARE
if statement preparation failed.E_DB_TYPE
if returned columns are unexpected.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(db_type), | intent(inout) | :: | db |
Database type. |
||
type(db_stmt_type), | intent(inout) | :: | db_stmt |
Database statement type. |
||
type(target_type), | intent(out) | :: | target |
Target data. |