Liking cljdoc? Tell your friends :D

wagoe.platform.shell.adapters.database.common.introspection

Table introspection for every adapter.

PostgreSQL, MySQL and H2 all read information_schema and differ only in which schema predicate identifies "this database", which HoneySQL dialect formats the query, and whether the table name may be folded to lower case. SQLite has no information_schema and reads sqlite_master and PRAGMA table_info instead.

Both forms return the same column maps — :name (lower case), :type, :not-null, :default, :primary-key, :generated — which is what the port promises and what the four separate copies did not consistently deliver.

Table introspection for every adapter.

PostgreSQL, MySQL and H2 all read `information_schema` and differ only in
which schema predicate identifies "this database", which HoneySQL dialect
formats the query, and whether the table name may be folded to lower case.
SQLite has no `information_schema` and reads `sqlite_master` and
`PRAGMA table_info` instead.

Both forms return the same column maps — `:name` (lower case), `:type`,
`:not-null`, `:default`, `:primary-key`, `:generated` — which is what the
port promises and what the four separate copies did not consistently
deliver.
raw docstring

information-schema-table-exists?clj

(information-schema-table-exists? {:keys [schema honey] :as spec}
                                  datasource
                                  table-name)

Whether table-name exists, per information_schema.tables.

spec is {:schema <predicate-value> :honey <sql/format opts or nil> :fold-table-name? bool}.

Whether `table-name` exists, per `information_schema.tables`.

`spec` is {:schema <predicate-value> :honey <sql/format opts or nil>
           :fold-table-name? bool}.
sourceraw docstring

information-schema-table-infoclj

(information-schema-table-info {:keys [schema honey generated-columns] :as spec}
                               datasource
                               table-name)

Column information for table-name, per information_schema. See information-schema-table-exists? for spec; its :generated-columns are the columns this engine reports identity and generated columns in.

Column information for `table-name`, per `information_schema`. See
`information-schema-table-exists?` for `spec`; its `:generated-columns` are
the columns this engine reports identity and generated columns in.
sourceraw docstring

sqlite-table-exists?clj

(sqlite-table-exists? datasource table-name)
source

sqlite-table-infoclj

(sqlite-table-info datasource table-name)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close