SQL DSL for data definition language (DDL). Supports a majority of MySQL's statements for tables and databases.
SQL DSL for data definition language (DDL). Supports a majority of MySQL's statements for tables and databases.
(add m spec)
(add m spec options)
Inputs: [m :- TableSpec spec] [m :- TableSpec spec options] Returns: TableSpec
Add column/index. Use with alt.
Inputs: [m :- TableSpec spec] [m :- TableSpec spec options] Returns: TableSpec Add column/index. Use with alt.
(after col)
Inputs: [col :- NamedOrColumn] Returns: ColumnPosition
Set column position. Use with add.
Inputs: [col :- NamedOrColumn] Returns: ColumnPosition Set column position. Use with add.
(alt spec)
Inputs: [spec :- TableSpec] Returns: String
Alter a table.
Inputs: [spec :- TableSpec] Returns: String Alter a table.
(alt-db db option)
Inputs: [db :- NamedOrDB, option :- TableOption] Returns: String
Alter a database.
Inputs: [db :- NamedOrDB, option :- TableOption] Returns: String Alter a database.
(append m x)
Inputs: [m :- TableSpec, x :- (U Columns ColumnSpec Index)] Returns: TableSpec
Append a set of columns/indexes or single column/index to a table.
Inputs: [m :- TableSpec, x :- (U Columns ColumnSpec Index)] Returns: TableSpec Append a set of columns/indexes or single column/index to a table.
(auto-inc start)
Inputs: [start :- Int] Returns: TableOption
Set the auto-increment table option.
Inputs: [start :- Int] Returns: TableOption Set the auto-increment table option.
(change m col col-spec)
Inputs: [m :- TableSpec, col :- NamedOrColumn, col-spec :- ColumnSpec] Returns: TableSpec
Change column. Use with alt.
Inputs: [m :- TableSpec, col :- NamedOrColumn, col-spec :- ColumnSpec] Returns: TableSpec Change column. Use with alt.
(character-set charset)
Inputs: [charset :- Named] Returns: TableOption
Set the character set table option.
Inputs: [charset :- Named] Returns: TableOption Set the character set table option.
(collate collation)
Inputs: [collation :- Named] Returns: TableOption
Set the collate table option.
Inputs: [collation :- Named] Returns: TableOption Set the collate table option.
(column col-name col-type options)
Inputs: [col-name col-type options] Returns: ColumnSpec
Inputs: [col-name col-type options] Returns: ColumnSpec
(column? x)
Inputs: [x :- Any] Returns: Boolean
Inputs: [x :- Any] Returns: Boolean
Column or index type definition.
Column or index type definition.
(columns? x)
Inputs: [x :- Any] Returns: Boolean
Inputs: [x :- Any] Returns: Boolean
(constraint & [arg0 & args])
Define a named constraint. Use with an index fn.
Define a named constraint. Use with an index fn.
(create spec & options)
Inputs: [spec :- TableOrDB & options :- [TableOption]] Returns: String
Create a table or database with options.
Inputs: [spec :- TableOrDB & options :- [TableOption]] Returns: String Create a table or database with options.
(db db-name)
Inputs: [db-name :- Named] Returns: DBSpec
Create a database.
Inputs: [db-name :- Named] Returns: DBSpec Create a database.
(db? x)
Inputs: [x :- Any] Returns: Boolean
Inputs: [x :- Any] Returns: Boolean
(default x)
Inputs: [x :- (U Number String)] Returns: DefaultValueSpec
Set the default value for a column. Use with a column fn.
Inputs: [x :- (U Number String)] Returns: DefaultValueSpec Set the default value for a column. Use with a column fn.
(defcolumns name & columns+keys)
Define one or more columns.
Define one or more columns.
(defindexfn fn-name index-type)
Define an index fn.
Define an index fn.
(deftypefn fn-name col-type)
Define a type fn (e.g., int, varchar).
Define a type fn (e.g., int, varchar).
(drop-column m col)
Inputs: [m :- TableSpec, col :- NamedOrColumn] Returns: TableSpec
Drop a column. Use with alt.
Inputs: [m :- TableSpec, col :- NamedOrColumn] Returns: TableSpec Drop a column. Use with alt.
(drop-db db)
Inputs: [db :- NamedOrDB] Returns: String
Drop a database.
Inputs: [db :- NamedOrDB] Returns: String Drop a database.
(drop-default m col)
Inputs: [m :- TableSpec, col :- NamedOrColumn] Returns: TableSpec
Drop column default. Use with alt.
Inputs: [m :- TableSpec, col :- NamedOrColumn] Returns: TableSpec Drop column default. Use with alt.
(drop-foreign-key m fk)
Inputs: [m :- TableSpec, fk :- NamedOrConstraint] Returns: TableSpec
Drop a foreign key. Use with alt.
Inputs: [m :- TableSpec, fk :- NamedOrConstraint] Returns: TableSpec Drop a foreign key. Use with alt.
(drop-index m index)
Inputs: [m :- TableSpec, index :- NamedOrConstraint] Returns: TableSpec
Drop an index. Use with alt.
Inputs: [m :- TableSpec, index :- NamedOrConstraint] Returns: TableSpec Drop an index. Use with alt.
(drop-primary-key m)
Inputs: [m :- TableSpec] Returns: TableSpec
Drop a primary key. Use with alt.
Inputs: [m :- TableSpec] Returns: TableSpec Drop a primary key. Use with alt.
(drop-table & tables)
Inputs: [& tables :- [NamedOrTable]] Returns: String
Drop one or more tables.
Inputs: [& tables :- [NamedOrTable]] Returns: String Drop one or more tables.
(drop-temp-table & tables)
Inputs: [& tables :- [NamedOrTable]] Returns: String
Drop one or more tables.
Inputs: [& tables :- [NamedOrTable]] Returns: String Drop one or more tables.
(engine eng)
Inputs: [eng :- Named] Returns: TableOption
Set the engine table option.
Inputs: [eng :- Named] Returns: TableOption Set the engine table option.
(foreign-key & [arg0 & args])
Define a foreign key. Use with create or alt.
Define a foreign key. Use with create or alt.
(idx index-type index-cols)
Inputs: [index-type index-cols] Returns: IndexSpec
Inputs: [index-type index-cols] Returns: IndexSpec
(index? x)
Inputs: [x :- Any] Returns: Boolean
Inputs: [x :- Any] Returns: Boolean
Keyword or symbol type definition.
Keyword or symbol type definition.
Named or column spec type definition.
Named or column spec type definition.
Named or table spec type definition.
Named or table spec type definition.
(rename m table)
Inputs: [m :- TableSpec, table :- NamedOrTable] Returns: TableSpec
Rename a table. Use with alt.
Inputs: [m :- TableSpec, table :- NamedOrTable] Returns: TableSpec Rename a table. Use with alt.
(rename-db old-db new-db)
Inputs: [old-db :- NamedOrDB, new-db :- NamedOrDB] Returns: String
Rename a database.
Inputs: [old-db :- NamedOrDB, new-db :- NamedOrDB] Returns: String Rename a database.
(set-default m col default)
Inputs: [m :- TableSpec, col :- NamedOrColumn, default :- (U String Number)] Returns: TableSpec
Set column default. Use with alt.
Inputs: [m :- TableSpec, col :- NamedOrColumn, default :- (U String Number)] Returns: TableSpec Set column default. Use with alt.
(strict-map->AddColumnSpec m3394 & [drop-extra-keys?__1999__auto__])
Factory function for class AddColumnSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class AddColumnSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->AddIndexSpec m4323 & [drop-extra-keys?__1999__auto__])
Factory function for class AddIndexSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class AddIndexSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->ChangeSpec m4369 & [drop-extra-keys?__1999__auto__])
Factory function for class ChangeSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class ChangeSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->ColumnPosition m3325 & [drop-extra-keys?__1999__auto__])
Factory function for class ColumnPosition, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class ColumnPosition, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->Columns m4124 & [drop-extra-keys?__1999__auto__])
Factory function for class Columns, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class Columns, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->ColumnSpec m3249 & [drop-extra-keys?__1999__auto__])
Factory function for class ColumnSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class ColumnSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->ConstraintSpec m3899 & [drop-extra-keys?__1999__auto__])
Factory function for class ConstraintSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class ConstraintSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->DBSpec m3109 & [drop-extra-keys?__1999__auto__])
Factory function for class DBSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class DBSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->DefaultValueSpec m3187 & [drop-extra-keys?__1999__auto__])
Factory function for class DefaultValueSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class DefaultValueSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->DropColumnSpec m4574 & [drop-extra-keys?__1999__auto__])
Factory function for class DropColumnSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class DropColumnSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->DropDefaultSpec m4511 & [drop-extra-keys?__1999__auto__])
Factory function for class DropDefaultSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class DropDefaultSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->DropForeignKeySpec m4755 & [drop-extra-keys?__1999__auto__])
Factory function for class DropForeignKeySpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class DropForeignKeySpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->DropIndexSpec m4637 & [drop-extra-keys?__1999__auto__])
Factory function for class DropIndexSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class DropIndexSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->DropPrimaryKeySpec m4700 & [drop-extra-keys?__1999__auto__])
Factory function for class DropPrimaryKeySpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class DropPrimaryKeySpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->ForeignKeySpec m3828 & [drop-extra-keys?__1999__auto__])
Factory function for class ForeignKeySpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class ForeignKeySpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->IndexSpec m3705 & [drop-extra-keys?__1999__auto__])
Factory function for class IndexSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class IndexSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->RenameSpec m4818 & [drop-extra-keys?__1999__auto__])
Factory function for class RenameSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class RenameSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->SetDefaultSpec m4440 & [drop-extra-keys?__1999__auto__])
Factory function for class SetDefaultSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class SetDefaultSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->TableOption m4206 & [drop-extra-keys?__1999__auto__])
Factory function for class TableOption, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class TableOption, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(strict-map->TableSpec m3981 & [drop-extra-keys?__1999__auto__])
Factory function for class TableSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class TableSpec, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
(table table-name)
Inputs: [table-name :- Named] Returns: TableSpec
Inputs: [table-name :- Named] Returns: TableSpec
(table? x)
Inputs: [x :- Any] Returns: Boolean
Inputs: [x :- Any] Returns: Boolean
Table spec or DB spec type definition.
Table spec or DB spec type definition.
(temp-table table-name)
Inputs: [table-name :- Named] Returns: TableSpec
Inputs: [table-name :- Named] Returns: TableSpec
Convert an object to SQL.
Convert an object to SQL.
(to-sql x)
(truncate table)
Inputs: [table :- NamedOrTable] Returns: String
Truncate a table.
Inputs: [table :- NamedOrTable] Returns: String Truncate a table.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close