Common schema management and DDL utilities.
Common schema management and DDL utilities.
(create-index-if-not-exists! ctx index-name table columns)Create index with IF NOT EXISTS support when available.
Args: ctx: Database context index-name: String index name table: String or keyword table name columns: Vector of column names
Returns: Execution result
Example: (create-index-if-not-exists! ctx "idx_users_email" :users [:email])
Create index with IF NOT EXISTS support when available. Args: ctx: Database context index-name: String index name table: String or keyword table name columns: Vector of column names Returns: Execution result Example: (create-index-if-not-exists! ctx "idx_users_email" :users [:email])
(execute-ddl! ctx ddl-statement)Execute DDL statement with logging.
Args: ctx: Database context ddl-statement: String DDL statement
Returns: Execution result
Example: (execute-ddl! ctx "CREATE TABLE users (id TEXT PRIMARY KEY)")
Execute DDL statement with logging. Args: ctx: Database context ddl-statement: String DDL statement Returns: Execution result Example: (execute-ddl! ctx "CREATE TABLE users (id TEXT PRIMARY KEY)")
(get-table-info ctx table-name)Get column information for a table using adapter-specific introspection.
Args: ctx: Database context table-name: String or keyword table name
Returns: Vector of column info maps
Example: (get-table-info ctx :users)
Get column information for a table using adapter-specific introspection. Args: ctx: Database context table-name: String or keyword table name Returns: Vector of column info maps Example: (get-table-info ctx :users)
(table-exists? ctx table-name)Check if a table exists using adapter-specific introspection.
Args: ctx: Database context table-name: String or keyword table name
Returns: Boolean - true if table exists
Example: (table-exists? ctx :users)
Check if a table exists using adapter-specific introspection. Args: ctx: Database context table-name: String or keyword table name Returns: Boolean - true if table exists Example: (table-exists? ctx :users)
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |