An optional DSL for generating DDL.
Intended to be used with clojure.java.jdbc, this provides a simple DSL - Domain Specific Language - that generates raw DDL strings. Any other DSL can be used instead. This DSL is entirely optional and is deliberately not very sophisticated.
An optional DSL for generating DDL. Intended to be used with clojure.java.jdbc, this provides a simple DSL - Domain Specific Language - that generates raw DDL strings. Any other DSL can be used instead. This DSL is entirely optional and is deliberately not very sophisticated.
(create-index index-name table-name cols & specs)
Given an index name, table name, vector of column names, and (optional) is-unique, return the DDL string for creating an index.
Examples: (create-index :indexname :tablename [:field1 :field2] :unique) "CREATE UNIQUE INDEX indexname ON tablename (field1, field2)"
(create-index :indexname :tablename [:field1 :field2]) "CREATE INDEX indexname ON tablename (field1, field2)"
Given an index name, table name, vector of column names, and (optional) is-unique, return the DDL string for creating an index. Examples: (create-index :indexname :tablename [:field1 :field2] :unique) "CREATE UNIQUE INDEX indexname ON tablename (field1, field2)" (create-index :indexname :tablename [:field1 :field2]) "CREATE INDEX indexname ON tablename (field1, field2)"
(create-table name & specs)
Given a table name and column specs with an optional table-spec return the DDL string for creating that table.
Given a table name and column specs with an optional table-spec return the DDL string for creating that table.
(drop-index name & {:keys [entities] :or {entities sql/as-is}})
Given an index name, return the DDL string for dropping that index.
Given an index name, return the DDL string for dropping that index.
(drop-table name & {:keys [entities] :or {entities sql/as-is}})
Given a table name, return the DDL string for dropping that table.
Given a table name, return the DDL string for dropping that table.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close