Contains cross-platform functions, and multimethods to be implemented for specific SQL backends, for database migrations (DDL).
Contains cross-platform functions, and multimethods to be implemented for specific SQL backends, for database migrations (DDL).
Clears all system txids from the transaction table.
Clears all system txids from the transaction table.
Returns the column definition as SQL string.
Returns the column definition as SQL string.
(column-type field-def)
Returns the type to pass to column-def snippet
Returns the type to pass to column-def snippet
Returns the SQL DDL required for creating the table as a map of {:constraints sqlvecs :main sqlvecs}
Returns the SQL DDL required for creating the table as a map of {:constraints sqlvecs :main sqlvecs}
(diff-schema db param-ns)
(diff-schema db schema etypes-and-reference-colls)
Generates a DDL diff from inspection of the given db
and comparison with entities of the given schema
.
Optionally restricted to etypes-and-reference-colls
(sequence of keywords).
Returns a map containing entity types as keys and maps of
{:constraints sqlvecs
:main sqlvecs}
as values.
Generates a DDL diff from inspection of the given `db` and comparison with entities of the given `schema`. Optionally restricted to `etypes-and-reference-colls` (sequence of keywords). Returns a map containing entity types as keys and maps of {:constraints sqlvecs :main sqlvecs} as values.
Generates a DDL diff, as a sqlvec, from inspection of the given db
and comparison with entities of the given ns
.
Optionally restricted to etypes
(sequence of keywords).
Returns a map of
{:constraints sqlvecs
:main sqlvecs}
if there are differences, nil if there are not.
Generates a DDL diff, as a sqlvec, from inspection of the given `db` and comparison with entities of the given `ns`. Optionally restricted to `etypes` (sequence of keywords). Returns a map of {:constraints sqlvecs :main sqlvecs} if there are differences, nil if there are not.
Ensures transaction infrastructure exists.
Ensures transaction infrastructure exists.
Returns a sequence of all constraints in the database.
Returns a sequence of all constraints in the database.
Returns a sequence of all tables in the database.
Returns a sequence of all tables in the database.
Returns the sql type for a database type and spec.
Returns the sql type for a database type and spec.
(update-schema! db schema)
(update-schema! db schema etypes)
Updates database db
for schema schema
.
Optionally restricted to etypes
(sequence of keywords).
Defaults to all detected changes.
Updates database `db` for schema `schema`. Optionally restricted to `etypes` (sequence of keywords). Defaults to all detected changes.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close