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