Liking cljdoc? Tell your friends :D

metabase.driver.util

Utility functions for common operations on drivers.

Utility functions for common operations on drivers.
raw docstring

available-driversclj

(available-drivers)

Return a set of all currently available drivers.

Return a set of all currently available drivers.
sourceraw docstring

available-drivers-infoclj

(available-drivers-info)

Return info about all currently available drivers, including their connection properties fields and supported features.

Return info about all currently available drivers, including their connection properties fields and supported
features.
sourceraw docstring

can-connect-with-details?clj

(can-connect-with-details? driver details-map & [throw-exceptions])

Check whether we can connect to a database with driver and details-map and perform a basic query such as SELECT 1. Specify optional param throw-exceptions if you want to handle any exceptions thrown yourself (e.g., so you can pass the exception message along to the user); otherwise defaults to returning false if a connection cannot be established.

(can-connect-with-details? :postgres {:host "localhost", :port 5432, ...})

Check whether we can connect to a database with `driver` and `details-map` and perform a basic query such as `SELECT
1`. Specify optional param `throw-exceptions` if you want to handle any exceptions thrown yourself (e.g., so you
can pass the exception message along to the user); otherwise defaults to returning `false` if a connection cannot be
established.

   (can-connect-with-details? :postgres {:host "localhost", :port 5432, ...})
sourceraw docstring

database->driverclj

(database->driver database-or-id)

Memoized function that returns the driver instance that should be used for Database with ID. (Databases aren't expected to change their types, and this optimization makes things a lot faster).

Memoized function that returns the driver instance that should be used for `Database` with ID. (Databases aren't
expected to change their types, and this optimization makes things a lot faster).
sourceraw docstring

featuresclj

(features driver)

Return a set of all features supported by driver.

Return a set of all features supported by `driver`.
sourceraw docstring

find-and-load-all-drivers!clj

(find-and-load-all-drivers!)

Search classpath for namespaces that start with metabase.driver., then require them, which should register them as a side-effect. Note that this will not load drivers added by 3rd-party plugins; they must register themselves appropriately when initialized by load-plugins!.

This really only needs to be done by the public settings API endpoint to populate the list of available drivers. Please avoid using this function elsewhere, as loading all of these namespaces can be quite expensive!

Search classpath for namespaces that start with `metabase.driver.`, then `require` them, which should register them
as a side-effect. Note that this will not load drivers added by 3rd-party plugins; they must register themselves
appropriately when initialized by `load-plugins!`.

This really only needs to be done by the public settings API endpoint to populate the list of available drivers.
Please avoid using this function elsewhere, as loading all of these namespaces can be quite expensive!
sourceraw docstring

report-timezone-if-supportedclj

(report-timezone-if-supported driver)

Returns the report-timezone if driver supports setting it's timezone and a report-timezone has been specified by the user.

Returns the report-timezone if `driver` supports setting it's timezone and a report-timezone has been specified by
the user.
sourceraw docstring

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

× close