dm_db_query_build Function

public function dm_db_query_build(db_query, base) result(sql)

Uses

  • proc~~dm_db_query_build~~UsesGraph proc~dm_db_query_build dm_db_query_build module~dm_util dm_util proc~dm_db_query_build->module~dm_util module~dm_error dm_error module~dm_util->module~dm_error module~dm_kind dm_kind module~dm_util->module~dm_kind module~dm_error->module~dm_kind module~dm_ascii dm_ascii module~dm_error->module~dm_ascii iso_fortran_env iso_fortran_env module~dm_kind->iso_fortran_env

Returns SQL string from query. If no base SQL query base is passed, uses query attribute sql instead. If attribute sql is not allocated, the SQL base query will be empty (and only the WHERE, ORDER BY, and LIMIT parameters are returned). A passed base query will overwrite the attribute of argument db_query.

For UPDATE queries, the columns must be specified with dm_db_query_update() and likely dm_db_query_where() first.

The function is prone to SQL injections. Only pass parametrised strings!

Arguments

Type IntentOptional Attributes Name
type(db_query_type), intent(inout) :: db_query

Database query type.

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

Base query string.

Return Value character(len=:), allocatable

SQL string.


Calls

proc~~dm_db_query_build~~CallsGraph proc~dm_db_query_build dm_db_query_build proc~dm_btoa dm_btoa proc~dm_db_query_build->proc~dm_btoa

Called by

proc~~dm_db_query_build~~CalledByGraph proc~dm_db_query_build dm_db_query_build proc~dm_db_json_select_beat dm_db_json_select_beat proc~dm_db_json_select_beat->proc~dm_db_query_build proc~dm_db_json_select_log dm_db_json_select_log proc~dm_db_json_select_log->proc~dm_db_query_build proc~dm_db_json_select_node dm_db_json_select_node proc~dm_db_json_select_node->proc~dm_db_query_build proc~dm_db_select_beat dm_db_select_beat proc~dm_db_select_beat->proc~dm_db_query_build proc~dm_db_select_image dm_db_select_image proc~dm_db_select_image->proc~dm_db_query_build proc~dm_db_select_log dm_db_select_log proc~dm_db_select_log->proc~dm_db_query_build proc~dm_db_select_node dm_db_select_node proc~dm_db_select_node->proc~dm_db_query_build proc~dm_db_select_observ dm_db_select_observ proc~dm_db_select_observ->proc~dm_db_query_build proc~dm_db_select_observ_ids dm_db_select_observ_ids proc~dm_db_select_observ_ids->proc~dm_db_query_build proc~dm_db_select_observ_views dm_db_select_observ_views proc~dm_db_select_observ_views->proc~dm_db_query_build proc~dm_db_select_observs_by_id dm_db_select_observs_by_id proc~dm_db_select_observs_by_id->proc~dm_db_query_build proc~dm_db_select_observs_by_id->proc~dm_db_select_observ proc~dm_db_select_sensor dm_db_select_sensor proc~dm_db_select_sensor->proc~dm_db_query_build proc~dm_db_select_target dm_db_select_target proc~dm_db_select_target->proc~dm_db_query_build proc~dm_db_select_transfer dm_db_select_transfer proc~dm_db_select_transfer->proc~dm_db_query_build proc~dm_db_update_transfer dm_db_update_transfer proc~dm_db_update_transfer->proc~dm_db_query_build interface~dm_db_select dm_db_select interface~dm_db_select->proc~dm_db_select_beat interface~dm_db_select->proc~dm_db_select_image interface~dm_db_select->proc~dm_db_select_log interface~dm_db_select->proc~dm_db_select_node interface~dm_db_select->proc~dm_db_select_observ interface~dm_db_select->proc~dm_db_select_sensor interface~dm_db_select->proc~dm_db_select_target interface~dm_db_select->proc~dm_db_select_transfer