Shared definitions and helper functions for use across different drivers.
Shared definitions and helper functions for use across different drivers.
(class->base-type klass)
Return the Field.base_type
that corresponds to a given class returned by the DB.
This is used to infer the types of results that come back from native queries.
Return the `Field.base_type` that corresponds to a given class returned by the DB. This is used to infer the types of results that come back from native queries.
Generic error messages that drivers should return in their implementation of humanize-connection-error-message
.
Generic error messages that drivers should return in their implementation of `humanize-connection-error-message`.
(create-db-time-formatters date-format-str)
Creates date formatters from DATE-FORMAT-STR
that will preserve the offset/timezone information. Will return a
JodaTime date formatter and a core Java SimpleDateFormat. Results of this are threadsafe and can safely be def'd.
Creates date formatters from `DATE-FORMAT-STR` that will preserve the offset/timezone information. Will return a JodaTime date formatter and a core Java SimpleDateFormat. Results of this are threadsafe and can safely be def'd.
(current-db-time driver database)
Implementation of driver/current-db-time
using the current-db-time-native-query
and
current-db-time-date-formatters
multimethods defined above. Execute a native query for the current time, and parse
the results using the date formatters, preserving the timezone. To use this implementation, you must implement the
aforementioned multimethods; no default implementation is provided.
Implementation of `driver/current-db-time` using the `current-db-time-native-query` and `current-db-time-date-formatters` multimethods defined above. Execute a native query for the current time, and parse the results using the date formatters, preserving the timezone. To use this implementation, you must implement the aforementioned multimethods; no default implementation is provided.
(current-db-time-date-formatters driver)
Return JODA time date formatters to parse the current time returned by current-db-time-native-query
. Used by
current-db-time
implementation below. You can use create-db-time-formatters
provided by this namespace to create
formatters for a date format string.
Return JODA time date formatters to parse the current time returned by `current-db-time-native-query`. Used by `current-db-time` implementation below. You can use `create-db-time-formatters` provided by this namespace to create formatters for a date format string.
(current-db-time-native-query driver)
Return a native query that will fetch the current time (presumably as a string) used by the current-db-time
implementation below.
Return a native query that will fetch the current time (presumably as a string) used by the `current-db-time` implementation below.
Map of the db additional-options
details field, useful for connection-properties
implementations. Should assoc a
:placeholder
key
Map of the db `additional-options` details field, useful for `connection-properties` implementations. Should assoc a `:placeholder` key
Map of the db name details field, useful for connection-properties
implementations
Map of the db name details field, useful for `connection-properties` implementations
Map of the db host details field, useful for connection-properties
implementations
Map of the db host details field, useful for `connection-properties` implementations
Default options listed above, keyed by name. These keys can be listed in the plugin manifest to specify connection properties for drivers shipped as separate modules, e.g.:
connection-properties: - db-name - host
See the plugin manifest reference for more details.
Default options listed above, keyed by name. These keys can be listed in the plugin manifest to specify connection properties for drivers shipped as separate modules, e.g.: connection-properties: - db-name - host See the [plugin manifest reference](https://github.com/metabase/metabase/wiki/Metabase-Plugin-Manifest-Reference) for more details.
Map of the db password details field, useful for connection-properties
implementations
Map of the db password details field, useful for `connection-properties` implementations
Map of the db port details field, useful for connection-properties
implementations. Implementations should assoc a
:default
key.
Map of the db port details field, useful for `connection-properties` implementations. Implementations should assoc a `:default` key.
Map of the db ssl details field, useful for connection-properties
implementations
Map of the db ssl details field, useful for `connection-properties` implementations
Map of the db user details field, useful for connection-properties
implementations
Map of the db user details field, useful for `connection-properties` implementations
(values->base-type values)
Given a sequence of VALUES, return the most common base type.
Given a sequence of VALUES, return the most common base type.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close