Utility functions for converting a prepared statement with ?
into a plain SQL query.
TODO - since this is no longer strictly a 'util' namespace (most :sql-jdbc
drivers need to implement one or
methods from here) let's rename this metabase.driver.sql.unprepare
when we get a chance.
Utility functions for converting a prepared statement with `?` into a plain SQL query. TODO - since this is no longer strictly a 'util' namespace (most `:sql-jdbc` drivers need to implement one or methods from here) let's rename this `metabase.driver.sql.unprepare` when we get a chance.
(unprepare driver [sql & args])
Convert a normal SQL [statement & prepared-statement-args]
vector into a flat, non-prepared statement.
Implementations should return a plain SQL string.
Drivers likely do not need to implement this method themselves -- instead, you should only need to provide
implementations of unprepare-value
for the cases where it is needed.
Convert a normal SQL `[statement & prepared-statement-args]` vector into a flat, non-prepared statement. Implementations should return a plain SQL string. Drivers likely do not need to implement this method themselves -- instead, you should only need to provide implementations of `unprepare-value` for the cases where it is needed.
(unprepare-date-with-iso-8601-fn iso-8601-fn value)
Convert a Date to appropriate raw SQL by passing an ISO-8601 literal string to the function named by iso-8601-fn
.
You can use this function to create implementations of unprepare-value
for Date values.
Convert a Date to appropriate raw SQL by passing an ISO-8601 literal string to the function named by `iso-8601-fn`. You can use this function to create implementations of `unprepare-value` for Date values.
(unprepare-value driver value)
Convert a single argument to appropriate raw SQL for splicing directly into a SQL query. Dispatches on both driver
and the class of value
.
Convert a single argument to appropriate raw SQL for splicing directly into a SQL query. Dispatches on both driver and the class of `value`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close