Liking cljdoc? Tell your friends :D

metabase.driver.common

Shared definitions and helper functions for use across different drivers.

Shared definitions and helper functions for use across different drivers.
raw docstring

class->base-typeclj

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

connection-error-messagesclj

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

create-db-time-formattersclj

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

current-db-timeclj

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

current-db-time-date-formatterscljmultimethod

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

current-db-time-native-querycljmultimethod

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

default-additional-options-detailsclj

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

default-dbname-detailsclj

Map of the db name details field, useful for connection-properties implementations

Map of the db name details field, useful for `connection-properties` implementations
sourceraw docstring

default-host-detailsclj

Map of the db host details field, useful for connection-properties implementations

Map of the db host details field, useful for `connection-properties` implementations
sourceraw docstring

default-optionsclj

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

default-password-detailsclj

Map of the db password details field, useful for connection-properties implementations

Map of the db password details field, useful for `connection-properties` implementations
sourceraw docstring

default-port-detailsclj

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

default-ssl-detailsclj

Map of the db ssl details field, useful for connection-properties implementations

Map of the db ssl details field, useful for `connection-properties` implementations
sourceraw docstring

default-user-detailsclj

Map of the db user details field, useful for connection-properties implementations

Map of the db user details field, useful for `connection-properties` implementations
sourceraw docstring

values->base-typeclj

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

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

× close