SQLite database adapter - main entry point implementing the DBAdapter protocol.
This namespace serves as the main entry point for SQLite database functionality, implementing the DBAdapter protocol and coordinating specialized modules for different aspects of SQLite operations.
The adapter has been refactored into 5 specialized namespaces:
Key Features:
SQLite-Specific Optimizations:
This namespace maintains backward compatibility by serving as the main entry point that other code can require directly.
SQLite database adapter - main entry point implementing the DBAdapter protocol. This namespace serves as the main entry point for SQLite database functionality, implementing the DBAdapter protocol and coordinating specialized modules for different aspects of SQLite operations. The adapter has been refactored into 5 specialized namespaces: - sqlite.connection: Connection management and PRAGMA settings - sqlite.query: SQLite-specific query building and boolean conversion - sqlite.metadata: Table introspection and schema information - sqlite.utils: Utility functions and DDL helpers - sqlite.core: Main adapter implementation and coordination (this namespace) Key Features: - SQLite-optimized connection management with PRAGMAs - Database-specific query building (LIKE for strings, boolean->int) - Schema introspection via sqlite_master and PRAGMA table_info - Integration with shared type conversion utilities SQLite-Specific Optimizations: - Text-based UUID and timestamp storage - Boolean as integer (0/1) representation - WAL mode, synchronous settings, and other PRAGMAs - Connection pool tuning for embedded usage This namespace maintains backward compatibility by serving as the main entry point that other code can require directly.
(initialize-sqlite-pragmas! datasource)(initialize-sqlite-pragmas! datasource custom-pragmas)Legacy function for initializing SQLite PRAGMA settings.
Deprecated: Use the new modular adapter instead.
Args: datasource: Database connection or connection pool custom-pragmas: Optional vector of additional PRAGMA statements
Legacy function for initializing SQLite PRAGMA settings. Deprecated: Use the new modular adapter instead. Args: datasource: Database connection or connection pool custom-pragmas: Optional vector of additional PRAGMA statements
(new-adapter)Create new SQLite adapter instance.
Returns: SQLite adapter implementing DBAdapter protocol
Create new SQLite adapter instance. Returns: SQLite adapter implementing DBAdapter protocol
(with-transaction binding & body)Macro for SQLite transaction management with consistent error handling.
Args: binding: [tx-var datasource] body: Expressions to execute within transaction
Example: (with-transaction [tx datasource] (execute-update! tx query1) (execute-update! tx query2))
Macro for SQLite transaction management with consistent error handling.
Args:
binding: [tx-var datasource]
body: Expressions to execute within transaction
Example:
(with-transaction [tx datasource]
(execute-update! tx query1)
(execute-update! tx query2))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 |