Generic JSON logs select function.
Returns beats in JSON format in allocatable string type array
strings
.
If no beats have been found, the array will be empty, and the
function returns E_DB_NO_ROWS
.
The function returns the following error codes:
E_ALLOC
if memory allocation failed.E_DB_BIND
if value binding 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(string_type), | intent(out), | allocatable | :: | strings(:) |
Returned JSON array. |
|
integer(kind=i8), | intent(in), | optional | :: | limit |
Max. number of beats. |
|
integer(kind=i8), | intent(out), | optional | :: | nbeats |
Number of beats. |
Iterator function that returns beats in JSON format in allocatable
string json
. The statement db_stmt
must be finalised once
finished.
If no beats have been found, the string will be empty, and the
function returns E_DB_NO_ROWS
.
The function returns the following error codes:
E_DB_BIND
if value binding 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(db_stmt_type), | intent(inout) | :: | db_stmt |
Database statement type. |
||
character(len=:), | intent(out), | allocatable | :: | json |
Returned JSON. |
|
integer(kind=i8), | intent(in), | optional | :: | limit |
Max. number of beats. |