Liking cljdoc? Tell your friends :D

metabase.models.query

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.
raw docstring

adhoc-queryclj

(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).
sourceraw docstring

average-execution-time-msclj

(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.
sourceraw docstring

Queryclj

(Query)
(Query id)
(Query & kvs)

Entity for 'query' table; instance of QueryInstance.

Entity for 'query' table; instance of QueryInstance.
sourceraw docstring

query->database-and-table-idsclj

(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.
sourceraw docstring

save-query-and-update-average-execution-time!clj

(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`.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close