dm_db_select Interface

public interface dm_db_select

Generic database select function.

Calls

interface~~dm_db_select~~CallsGraph interface~dm_db_select dm_db_select proc~dm_db_select_beat dm_db_select_beat interface~dm_db_select->proc~dm_db_select_beat proc~dm_db_select_image dm_db_select_image interface~dm_db_select->proc~dm_db_select_image proc~dm_db_select_log dm_db_select_log interface~dm_db_select->proc~dm_db_select_log proc~dm_db_select_node dm_db_select_node interface~dm_db_select->proc~dm_db_select_node proc~dm_db_select_observ dm_db_select_observ interface~dm_db_select->proc~dm_db_select_observ proc~dm_db_select_sensor dm_db_select_sensor interface~dm_db_select->proc~dm_db_select_sensor proc~dm_db_select_target dm_db_select_target interface~dm_db_select->proc~dm_db_select_target proc~dm_db_select_transfer dm_db_select_transfer interface~dm_db_select->proc~dm_db_select_transfer interface~dm_db_bind dm_db_bind proc~dm_db_select_beat->interface~dm_db_bind interface~dm_db_query_where dm_db_query_where proc~dm_db_select_beat->interface~dm_db_query_where interface~dm_db_row_next dm_db_row_next proc~dm_db_select_beat->interface~dm_db_row_next proc~dm_db_finalize dm_db_finalize proc~dm_db_select_beat->proc~dm_db_finalize proc~dm_db_prepare dm_db_prepare proc~dm_db_select_beat->proc~dm_db_prepare proc~dm_db_query_build dm_db_query_build proc~dm_db_select_beat->proc~dm_db_query_build proc~dm_db_query_destroy dm_db_query_destroy proc~dm_db_select_beat->proc~dm_db_query_destroy proc~dm_db_step dm_db_step proc~dm_db_select_beat->proc~dm_db_step proc~dm_is_error dm_is_error proc~dm_db_select_beat->proc~dm_is_error proc~dm_db_select_image->interface~dm_db_bind proc~dm_db_select_image->interface~dm_db_query_where proc~dm_db_select_image->interface~dm_db_row_next proc~dm_db_select_image->proc~dm_db_finalize proc~dm_db_select_image->proc~dm_db_prepare proc~dm_db_select_image->proc~dm_db_query_build proc~dm_db_select_image->proc~dm_db_query_destroy proc~dm_db_select_image->proc~dm_db_step proc~dm_db_select_image->proc~dm_is_error proc~dm_db_select_log->interface~dm_db_bind proc~dm_db_select_log->interface~dm_db_query_where proc~dm_db_select_log->interface~dm_db_row_next proc~dm_db_select_log->proc~dm_db_finalize proc~dm_db_select_log->proc~dm_db_prepare proc~dm_db_select_log->proc~dm_db_query_build proc~dm_db_select_log->proc~dm_db_query_destroy proc~dm_db_select_log->proc~dm_db_step proc~dm_db_select_log->proc~dm_is_error proc~dm_db_select_node->interface~dm_db_bind proc~dm_db_select_node->interface~dm_db_query_where proc~dm_db_select_node->interface~dm_db_row_next proc~dm_db_select_node->proc~dm_db_finalize proc~dm_db_select_node->proc~dm_db_prepare proc~dm_db_select_node->proc~dm_db_query_build proc~dm_db_select_node->proc~dm_db_query_destroy proc~dm_db_select_node->proc~dm_db_step proc~dm_db_select_node->proc~dm_is_error proc~dm_db_select_observ->interface~dm_db_bind interface~dm_db_column dm_db_column proc~dm_db_select_observ->interface~dm_db_column proc~dm_db_select_observ->interface~dm_db_query_where proc~dm_db_select_observ->interface~dm_db_row_next proc~dm_db_column_is_float dm_db_column_is_float proc~dm_db_select_observ->proc~dm_db_column_is_float proc~dm_db_column_is_integer dm_db_column_is_integer proc~dm_db_select_observ->proc~dm_db_column_is_integer proc~dm_db_column_is_text dm_db_column_is_text proc~dm_db_select_observ->proc~dm_db_column_is_text proc~dm_db_select_observ->proc~dm_db_finalize proc~dm_db_is_prepared dm_db_is_prepared proc~dm_db_select_observ->proc~dm_db_is_prepared proc~dm_db_select_observ->proc~dm_db_prepare proc~dm_db_select_observ->proc~dm_db_query_build proc~dm_db_select_observ->proc~dm_db_query_destroy proc~dm_db_reset dm_db_reset proc~dm_db_select_observ->proc~dm_db_reset proc~dm_db_select_observ->proc~dm_db_step proc~dm_db_select_observ->proc~dm_is_error proc~dm_db_select_sensor->interface~dm_db_bind proc~dm_db_select_sensor->interface~dm_db_query_where proc~dm_db_select_sensor->interface~dm_db_row_next proc~dm_db_select_sensor->proc~dm_db_finalize proc~dm_db_select_sensor->proc~dm_db_prepare proc~dm_db_select_sensor->proc~dm_db_query_build proc~dm_db_select_sensor->proc~dm_db_query_destroy proc~dm_db_select_sensor->proc~dm_db_step proc~dm_db_select_sensor->proc~dm_is_error proc~dm_db_select_target->interface~dm_db_bind proc~dm_db_select_target->interface~dm_db_query_where proc~dm_db_select_target->interface~dm_db_row_next proc~dm_db_select_target->proc~dm_db_finalize proc~dm_db_select_target->proc~dm_db_prepare proc~dm_db_select_target->proc~dm_db_query_build proc~dm_db_select_target->proc~dm_db_query_destroy proc~dm_db_select_target->proc~dm_db_step proc~dm_db_select_target->proc~dm_is_error proc~dm_db_select_transfer->interface~dm_db_bind proc~dm_db_select_transfer->interface~dm_db_query_where proc~dm_db_select_transfer->interface~dm_db_row_next proc~dm_db_select_transfer->proc~dm_db_finalize proc~dm_db_select_transfer->proc~dm_db_prepare proc~dm_db_select_transfer->proc~dm_db_query_build proc~dm_db_select_transfer->proc~dm_db_query_destroy proc~dm_db_select_transfer->proc~dm_db_step proc~dm_db_select_transfer->proc~dm_is_error sqlite3_column_type sqlite3_column_type proc~dm_db_column_is_float->sqlite3_column_type proc~dm_db_column_is_integer->sqlite3_column_type proc~dm_db_column_is_text->sqlite3_column_type sqlite3_finalize sqlite3_finalize proc~dm_db_finalize->sqlite3_finalize sqlite3_prepare_v2 sqlite3_prepare_v2 proc~dm_db_prepare->sqlite3_prepare_v2 proc~dm_btoa dm_btoa proc~dm_db_query_build->proc~dm_btoa sqlite3_reset sqlite3_reset proc~dm_db_reset->sqlite3_reset sqlite3_step sqlite3_step proc~dm_db_step->sqlite3_step

Module Procedures

private function db_select_beats_array(db, beats, limit, nbeats) result(rc)

Returns heatbeats from database in array beats. An optional limit may be passed in limit.

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.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(beat_type), intent(out), allocatable :: beats(:)

Returned beat types.

integer(kind=i8), intent(in), optional :: limit

Max. number of beats.

integer(kind=i8), intent(out), optional :: nbeats

Total number of beats in database.

Return Value integer

private function db_select_beats_iter(db, dbs, beat, limit, validate) result(rc)

Iterator function that returns heatbeats from database in beat. An optional limit may be passed in limit. The statement db_stmt must be finalised once finished.

The function returns the following error codes:

  • E_DB_BIND if value binding failed.
  • E_DB_DONE if statement finished.
  • E_DB_PREPARE if statement preparation failed.
  • E_DB_TYPE if returned columns are unexpected.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(db_stmt_type), intent(inout) :: dbs

Database statement type.

type(beat_type), intent(out) :: beat

Returned beat type.

integer(kind=i8), intent(in), optional :: limit

Max. number of beats.

logical, intent(in), optional :: validate

Validate column types.

Return Value integer

private function db_select_data_points_array(db, dps, node_id, sensor_id, target_id, response_name, from, to, error, desc, limit, ndps) result(rc)

Returns data points from observations database in dps. This function selects only responses of error E_NONE, unless argument error is passed, then only of the given error code.

The function returns the following error codes:

  • E_ALLOC if memory allocation failed.
  • E_DB_BIND if value binding failed.
  • E_DB_FINALIZE if statement finalisation failed.
  • E_DB_NO_ROWS if no rows are returned.
  • E_DB_PREPARE if statement preparation failed.
  • E_DB_STEP if step execution failed.
  • E_DB_TYPE if returned columns are unexpected.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(dp_type), intent(out), allocatable :: dps(:)

Returned data points.

character(len=*), intent(in) :: node_id

Node id.

character(len=*), intent(in) :: sensor_id

Sensor id.

character(len=*), intent(in) :: target_id

Target id.

character(len=*), intent(in) :: response_name

Response name.

character(len=*), intent(in), optional :: from

Beginning of time span.

character(len=*), intent(in), optional :: to

End of time span.

integer, intent(in), optional :: error

Response error code.

logical, intent(in), optional :: desc

Descending order.

integer(kind=i8), intent(in), optional :: limit

Max. number of data points.

integer(kind=i8), intent(out), optional :: ndps

Number of data points.

Return Value integer

private function db_select_data_points_iter(db, dbs, dp, node_id, sensor_id, target_id, response_name, from, to, error, desc, limit, validate) result(rc)

Iterator function that returns data points from observations database in dp. This function selects only responses of error E_NONE, unless argument error is passed, then only of the given error code. The statement db_stmt must be finalised once finished.

The function returns the following error codes:

  • E_DB_BIND if value binding failed.
  • E_DB_DONE if statement finished.
  • E_DB_PREPARE if statement preparation failed.
  • E_DB_TYPE if returned columns are unexpected.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(db_stmt_type), intent(inout) :: dbs

Database statement type.

type(dp_type), intent(out) :: dp

Returned data point.

character(len=*), intent(in) :: node_id

Node id.

character(len=*), intent(in) :: sensor_id

Sensor id.

character(len=*), intent(in) :: target_id

Target id.

character(len=*), intent(in) :: response_name

Response name.

character(len=*), intent(in), optional :: from

Beginning of time span.

character(len=*), intent(in), optional :: to

End of time span.

integer, intent(in), optional :: error

Response error code.

logical, intent(in), optional :: desc

Descending order.

integer(kind=i8), intent(in), optional :: limit

Max. number of data points.

logical, intent(in), optional :: validate

Validate column types.

Return Value integer

private function db_select_images_array(db, images, node_id, sensor_id, target_id, from, to, desc, limit, nimages) result(rc)

Returns images in allocatable array images.

The function returns the following error codes:

  • E_ALLOC if memory allocation failed.
  • E_DB_BIND if value binding failed.
  • E_DB_FINALIZE if statement finalisation 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.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(image_type), intent(out), allocatable :: images(:)

Returned image data array.

character(len=*), intent(in), optional :: node_id

Node id.

character(len=*), intent(in), optional :: sensor_id

Sensor id.

character(len=*), intent(in), optional :: target_id

Target id.

character(len=*), intent(in), optional :: from

Begin of time range.

character(len=*), intent(in), optional :: to

End of time range.

logical, intent(in), optional :: desc

Descending order.

integer(kind=i8), intent(in), optional :: limit

Max. numbers of images.

integer(kind=i8), intent(out), optional :: nimages

Total number of images.

Return Value integer

private function db_select_images_iter(db, dbs, image, node_id, sensor_id, target_id, from, to, desc, limit, validate) result(rc)

Iterator function that returns images in images. The statement db_stmt must be finalised once finished.

The function returns the following error codes:

  • E_DB_BIND if value binding failed.
  • E_DB_DONE if statement finished.
  • E_DB_NO_ROWS if no rows are returned.
  • E_DB_PREPARE if statement preparation failed.
  • E_DB_TYPE if returned columns are unexpected.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(db_stmt_type), intent(inout) :: dbs

Database statement type.

type(image_type), intent(out) :: image

Returned image type.

character(len=*), intent(in), optional :: node_id

Node id.

character(len=*), intent(in), optional :: sensor_id

Sensor id.

character(len=*), intent(in), optional :: target_id

Target id.

character(len=*), intent(in), optional :: from

Begin of time range.

character(len=*), intent(in), optional :: to

End of time range.

logical, intent(in), optional :: desc

Descending order.

integer(kind=i8), intent(in), optional :: limit

Max. numbers of images.

logical, intent(in), optional :: validate

Validate column types.

Return Value integer

private function db_select_logs_array(db, logs, node_id, sensor_id, target_id, observ_id, source, from, to, min_level, max_level, error, desc, limit, nlogs) result(rc)

Returns logs in allocatable array logs.

The function returns the following error codes:

  • E_ALLOC if memory allocation failed.
  • E_DB_BIND if value binding failed.
  • E_DB_FINALIZE if statement finalisation 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.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(log_type), intent(out), allocatable :: logs(:)

Returned log data array.

character(len=*), intent(in), optional :: node_id

Node id.

character(len=*), intent(in), optional :: sensor_id

Sensor id.

character(len=*), intent(in), optional :: target_id

Target id.

character(len=*), intent(in), optional :: observ_id

Observation id.

character(len=*), intent(in), optional :: source

Source name.

character(len=*), intent(in), optional :: from

Begin of time range.

character(len=*), intent(in), optional :: to

End of time range.

integer, intent(in), optional :: min_level

Minimum log level.

integer, intent(in), optional :: max_level

Maximum log level.

integer, intent(in), optional :: error

Error code.

logical, intent(in), optional :: desc

Descending order.

integer(kind=i8), intent(in), optional :: limit

Max. numbers of logs.

integer(kind=i8), intent(out), optional :: nlogs

Total number of logs.

Return Value integer

private function db_select_logs_iter(db, dbs, log, node_id, sensor_id, target_id, observ_id, source, from, to, min_level, max_level, error, desc, limit, validate) result(rc)

Iterator function that returns logs in logs. The statement db_stmt must be finalised once finished.

The function returns the following error codes:

  • E_DB_BIND if value binding failed.
  • E_DB_DONE if statement finished.
  • E_DB_NO_ROWS if no rows are returned.
  • E_DB_PREPARE if statement preparation failed.
  • E_DB_TYPE if returned columns are unexpected.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(db_stmt_type), intent(inout) :: dbs

Database statement type.

type(log_type), intent(out) :: log

Returned log type.

character(len=*), intent(in), optional :: node_id

Node id.

character(len=*), intent(in), optional :: sensor_id

Sensor id.

character(len=*), intent(in), optional :: target_id

Target id.

character(len=*), intent(in), optional :: observ_id

Observation id.

character(len=*), intent(in), optional :: source

Source name.

character(len=*), intent(in), optional :: from

Begin of time range.

character(len=*), intent(in), optional :: to

End of time range.

integer, intent(in), optional :: min_level

Minimum log level.

integer, intent(in), optional :: max_level

Maximum log level.

integer, intent(in), optional :: error

Error code.

logical, intent(in), optional :: desc

Descending order.

integer(kind=i8), intent(in), optional :: limit

Max. numbers of logs.

logical, intent(in), optional :: validate

Validate column types.

Return Value integer

private function db_select_nodes_array(db, nodes, nnodes) result(rc)

Returns all sensor nodes in allocatable array nodes.

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.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(node_type), intent(out), allocatable :: nodes(:)

Returned node data array.

integer(kind=i8), intent(out), optional :: nnodes

Number of nodes.

Return Value integer

private function db_select_nodes_iter(db, dbs, node, validate) result(rc)

Iterator function that returns all sensor nodes in node. The statement db_stmt must be finalised once finished.

The function returns the following error codes:

  • E_DB_DONE if statement finished.
  • E_DB_PREPARE if statement preparation failed.
  • E_DB_TYPE if returned columns are unexpected.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(db_stmt_type), intent(inout) :: dbs

Database statement type.

type(node_type), intent(out) :: node

Returned node data.

logical, intent(in), optional :: validate

Validate column types.

Return Value integer

private function db_select_observs_array(db, observs, node_id, sensor_id, target_id, from, to, desc, limit, stub, nobservs) result(rc)

Returns observations in observs, with optional node id, sensor id, target id, from, to. By default, observations are returned in ascending order, unless desc is passed and .true.. The maximum number of observations may be passed in limit.

The stub is .true., neither receivers nor requests are read from database.

The total number of observations is returned in optional argument nobservs.

The function returns the following error codes:

  • E_ALLOC if memory allocation failed.
  • E_DB_BIND if value binding failed.
  • E_DB_FINALIZE if statement finalisation 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.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(observ_type), intent(out), allocatable :: observs(:)

Returned observation data.

character(len=*), intent(in), optional :: node_id

Node id.

character(len=*), intent(in), optional :: sensor_id

Sensor id.

character(len=*), intent(in), optional :: target_id

Target id.

character(len=*), intent(in), optional :: from

Beginning of time span.

character(len=*), intent(in), optional :: to

End of time span.

logical, intent(in), optional :: desc

Descending order.

integer(kind=i8), intent(in), optional :: limit

Max. number of observations.

logical, intent(in), optional :: stub

Without receivers, requests, responses.

integer(kind=i8), intent(out), optional :: nobservs

Number of observations.

Return Value integer

private function db_select_observs_iter(db, dbs, observ, node_id, sensor_id, target_id, from, to, desc, limit, stub, validate) result(rc)

Iterator function that returns observations in observ, with optional node id, sensor id, target id, from, to. By default, observations are returned in ascending order, unless desc is passed and .true.. The maximum number of observations may be passed in limit. The statement db_stmt must be finalised once finished.

The stub is .true., neither receivers nor requests are read from database.

The function returns the following error codes:

  • E_DB_BIND if value binding failed.
  • E_DB_DONE if statement finished.
  • E_DB_PREPARE if statement preparation failed.
  • E_DB_TYPE if returned columns are unexpected.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(db_stmt_type), intent(inout) :: dbs

Database statement type.

type(observ_type), intent(out) :: observ

Returned observation type.

character(len=*), intent(in), optional :: node_id

Node id.

character(len=*), intent(in), optional :: sensor_id

Sensor id.

character(len=*), intent(in), optional :: target_id

Target id.

character(len=*), intent(in), optional :: from

Beginning of time span.

character(len=*), intent(in), optional :: to

End of time span.

logical, intent(in), optional :: desc

Descending order.

integer(kind=i8), intent(in), optional :: limit

Max. number of observations.

logical, intent(in), optional :: stub

Without receivers, requests, responses.

logical, intent(in), optional :: validate

Validate column types.

Return Value integer

private function db_select_sensors_array(db, sensors, node_id, nsensors) result(rc)

Returns all sensors in allocatable array sensors. If argument node_id is passed, returns only sensors of this node.

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.
  • E_INVALID if node id is empty.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(sensor_type), intent(out), allocatable :: sensors(:)

Returned sensor data array.

character(len=*), intent(in), optional :: node_id

Node id.

integer(kind=i8), intent(out), optional :: nsensors

Number of returned sensors.

Return Value integer

private function db_select_sensors_iter(db, dbs, sensor, node_id, validate) result(rc)

Iterator function that returns all sensors in sensor. The statement db_stmt must be finalised once finished.

The function returns the following error codes:

  • E_DB_DONE if statement finished.
  • E_DB_PREPARE if statement preparation failed.
  • E_DB_TYPE if returned columns are unexpected.
  • E_INVALID if node id is empty.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(db_stmt_type), intent(inout) :: dbs

Database statement type.

type(sensor_type), intent(out) :: sensor

Returned sensor data.

character(len=*), intent(in), optional :: node_id

Node id.

logical, intent(in), optional :: validate

Validate column types.

Return Value integer

private function db_select_targets_array(db, targets, ntargets) result(rc)

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.

Arguments

Type IntentOptional 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.

Return Value integer

private function db_select_targets_iter(db, dbs, target, validate) result(rc)

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_DONE if statement finished.
  • E_DB_PREPARE if statement preparation failed.
  • E_DB_TYPE if returned columns are unexpected.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(db_stmt_type), intent(inout) :: dbs

Database statement type.

type(target_type), intent(out) :: target

Target data.

logical, intent(in), optional :: validate

Validate column types.

Return Value integer

public function dm_db_select_beat(db, beat, node_id) result(rc)

Returns heartbeat associated with given node id in beat.

Read more…

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(beat_type), intent(out) :: beat

Returned beat type.

character(len=*), intent(in) :: node_id

Node id.

Return Value integer

public function dm_db_select_image(db, image, image_id) result(rc)

Returns image data associated with given image id from images table.

Read more…

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(image_type), intent(out) :: image

Returned image data.

character(len=*), intent(in) :: image_id

Image id.

Return Value integer

public function dm_db_select_log(db, log, log_id) result(rc)

Returns log associated with given id in log.

Read more…

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(log_type), intent(out) :: log

Returned log data.

character(len=*), intent(in) :: log_id

Log id.

Return Value integer

public function dm_db_select_node(db, node, node_id) result(rc)

Returns node data associated with given id in node.

Read more…

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(node_type), intent(out) :: node

Returned node data.

character(len=*), intent(in) :: node_id

Node id.

Return Value integer

public function dm_db_select_observ(db, observ, observ_id) result(rc)

Returns observation referenced by the given id from database.

Read more…

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(observ_type), intent(out) :: observ

Selected observation.

character(len=*), intent(in) :: observ_id

Observation id (UUID).

Return Value integer

public function dm_db_select_sensor(db, sensor, sensor_id) result(rc)

Returns sensor data associated with given sensor id from database.

Read more…

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(sensor_type), intent(out) :: sensor

Returned sensor data.

character(len=*), intent(in) :: sensor_id

Sensor id.

Return Value integer

public function dm_db_select_target(db, target, target_id) result(rc)

Returns target data associated with given target id from database.

Read more…

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(target_type), intent(out) :: target

Returned target data.

character(len=*), intent(in) :: target_id

Target id.

Return Value integer

public function dm_db_select_transfer(db, transfer, transfer_id, type_id) result(rc)

Returns transfer data associated with given transfer id and/or type_id from transfer database.

Read more…

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

type(transfer_type), intent(out) :: transfer

Returned transfer data.

character(len=*), intent(in), optional :: transfer_id

Transfer id.

character(len=*), intent(in), optional :: type_id

Transfer type id.

Return Value integer