query_components
prefect.server.database.query_components
Classes
FlowRunGraphV2Node
BaseQueryComponents
Abstract base class used to inject dialect-specific SQL operations into Prefect.
Methods:
unique_key
Returns a key used to determine whether to instantiate a new DB interface.
insert
dialect-specific insert statement
uses_json_strings
specifies whether the configured dialect returns JSON as strings
cast_to_json
casts to JSON object if necessary
build_json_object
builds a JSON object from sequential key-value pairs
json_arr_agg
aggregates a JSON array
make_timestamp_intervals
set_state_id_on_inserted_flow_runs_statement
get_scheduled_flow_runs_from_work_queues
Returns all scheduled runs in work queues, subject to provided parameters.
This query returns a (orm_models.FlowRun, orm_models.WorkQueue.id)
pair; calling
result.all()
will return both; calling result.scalars().unique().all()
will return only the flow run because it grabs the first result.
clear_configuration_value_cache_for_key
Removes a configuration key from the cache.
AsyncPostgresQueryComponents
Methods:
insert
uses_json_strings
cast_to_json
build_json_object
json_arr_agg
make_timestamp_intervals
set_state_id_on_inserted_flow_runs_statement
Given a list of flow run ids and associated states, set the state_id to the appropriate state for all flow runs
UUIDList
Map a JSON list of strings back to a list of UUIDs at the result loading stage
Methods:
process_result_value
AioSqliteQueryComponents
Methods:
insert
uses_json_strings
cast_to_json
build_json_object
json_arr_agg
make_timestamp_intervals
set_state_id_on_inserted_flow_runs_statement
Given a list of flow run ids and associated states, set the state_id to the appropriate state for all flow runs