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 — 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` — which is what the port promises and what the four separate copies did not consistently deliver.
(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}.(information-schema-table-info {:keys [schema honey] :as spec}
datasource
table-name)Column information for table-name, per information_schema. See
information-schema-table-exists? for spec.
Column information for `table-name`, per `information_schema`. See `information-schema-table-exists?` for `spec`.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |