Liking cljdoc? Tell your friends :D

specomatic-db.db.migration

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).
raw docstring

clear-transaction-system-txid!cljmultimethod

Clears all system txids from the transaction table.

Clears all system txids from the transaction table.
sourceraw docstring

column-defcljmultimethod

Returns the column definition as SQL string.

Returns the column definition as SQL string.
sourceraw docstring

column-typeclj

(column-type field-def)

Returns the type to pass to column-def snippet

Returns the type to pass to column-def snippet
sourceraw docstring

create-tablecljmultimethod

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

diff-schemaclj

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

diff-tablecljmultimethod

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

ensure-transaction-infrastructure!cljmultimethod

Ensures transaction infrastructure exists.

Ensures transaction infrastructure exists.
sourceraw docstring

get-constraintscljmultimethod

Returns a sequence of all constraints in the database.

Returns a sequence of all constraints in the database.
sourceraw docstring

get-tablescljmultimethod

Returns a sequence of all tables in the database.

Returns a sequence of all tables in the database.
sourceraw docstring

sql-typecljmultimethod

Returns the sql type for a database type and spec.

Returns the sql type for a database type and spec.
sourceraw docstring

update-schema!clj

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

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

× close