Functions related to the 'Query' model, which records stuff such as average query execution time.
Functions related to the 'Query' model, which records stuff such as average query execution time.
(adhoc-query query)
Wrap query map into a Query object (mostly to fascilitate type dispatch).
Wrap query map into a Query object (mostly to fascilitate type dispatch).
(average-execution-time-ms query-hash)
Fetch the average execution time (in milliseconds) for query with QUERY-HASH if available.
Returns nil
if no information is available.
Fetch the average execution time (in milliseconds) for query with QUERY-HASH if available. Returns `nil` if no information is available.
(Query)
(Query id)
(Query & kvs)
Entity for 'query' table; instance of QueryInstance.
Entity for 'query' table; instance of QueryInstance.
(query->database-and-table-ids
{database-id :database query-type :type {:keys [source-table]} :query})
Return a map with :database-id
and source :table-id
that should be saved for a Card. Handles queries that use
other queries as their source (ones that come in with a :source-table
like card__100
) recursively, as well as
normal queries.
Return a map with `:database-id` and source `:table-id` that should be saved for a Card. Handles queries that use other queries as their source (ones that come in with a `:source-table` like `card__100`) recursively, as well as normal queries.
(save-query-and-update-average-execution-time! query
query-hash
execution-time-ms)
Update the recorded average execution time (or insert a new record if needed) for query
with query-hash
.
Update the recorded average execution time (or insert a new record if needed) for `query` with `query-hash`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close