Database connection and basic operations
Database connection and basic operations
(batch-insert db table-name records)
Insert multiple records in a batch
Insert multiple records in a batch
(build-count-sql table-name)
Build a COUNT SQL statement
Build a COUNT SQL statement
(build-create-table-sql table-name columns)
Build CREATE TABLE SQL statement
Build CREATE TABLE SQL statement
(build-delete-sql table-name)
Build a DELETE SQL statement
Build a DELETE SQL statement
(build-drop-table-sql table-name)
Build DROP TABLE SQL statement
Build DROP TABLE SQL statement
(build-insert-sql table-name columns)
Build an INSERT SQL statement
Build an INSERT SQL statement
(build-select-sql table-name & {:keys [where limit offset]})
Build a SELECT SQL statement
Build a SELECT SQL statement
(build-table-exists-sql)
Build SQL to check if table exists
Build SQL to check if table exists
(build-table-info-sql table-name)
Build SQL to get table information
Build SQL to get table information
(build-update-sql table-name columns)
Build an UPDATE SQL statement
Build an UPDATE SQL statement
(count-records db table-name)
Count records in a table
Count records in a table
(create-table db table-name columns)
Create a table with given columns
Create a table with given columns
(delete-record db table-name id)
Delete a record by ID
Delete a record by ID
(drop-table db table-name)
Drop a table from the database
Drop a table from the database
(execute-command db sql params)
Execute a SQL command and return success status
Execute a SQL command and return success status
(execute-query db sql params)
Execute a SQL query and return results
Execute a SQL query and return results
(extract-generated-id insert-result)
Extract the generated ID from insert result
Extract the generated ID from insert result
(find-all db table-name)
Find all records in a table
Find all records in a table
(find-by-criteria db table-name criteria)
Find records by criteria
Find records by criteria
(find-by-id db table-name id)
Find a record by ID
Find a record by ID
(get-table-columns db table-name)
Get column names for a table
Get column names for a table
(insert-record db table-name record)
Insert a record and return the generated ID
Insert a record and return the generated ID
(safe-db-operation operation error-message)
Execute database operation with proper error handling
Execute database operation with proper error handling
(table-exists? db table-name)
Check if a table exists in the database
Check if a table exists in the database
(transaction db operations)
Execute operations within a database transaction
Execute operations within a database transaction
(try-db-operation operation error-message)
Execute database operation, returning nil on error
Execute database operation, returning nil on error
(update-record db table-name id updates)
Update a record by ID
Update a record by ID
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 |