H2 database adapter - main entry point implementing the DBAdapter protocol.
This namespace serves as the main entry point for H2 database functionality, implementing the DBAdapter protocol and coordinating specialized modules for different aspects of H2 operations.
The adapter has been refactored into 5 specialized namespaces:
Key Features:
H2-Specific Optimizations:
H2 database adapter - main entry point implementing the DBAdapter protocol. This namespace serves as the main entry point for H2 database functionality, implementing the DBAdapter protocol and coordinating specialized modules for different aspects of H2 operations. The adapter has been refactored into 5 specialized namespaces: - h2.connection: Connection management and H2-specific settings - h2.query: H2-specific query building and boolean handling - h2.metadata: Table introspection and schema information - h2.utils: Utility functions and DDL helpers - h2.core: Main adapter implementation and coordination (this namespace) Key Features: - PostgreSQL compatibility mode for easier migration - In-memory databases for fast testing - File-based databases for development - Standard SQL features with good performance - Native boolean support (no conversion needed) H2-Specific Optimizations: - PostgreSQL compatibility mode by default - Proper timezone handling - Case-insensitive identifiers for compatibility - Optimized connection pool settings for embedded usage
(new-adapter)Create new H2 adapter instance.
Returns: H2 adapter implementing DBAdapter protocol
Create new H2 adapter instance. Returns: H2 adapter implementing DBAdapter protocol
(with-transaction binding & body)Macro for H2 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 H2 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 |