(err-code e)Returns the full (extended) SQLite error code by bypassing standard JDBC and accessing the native SQLite driver result code.
Returns the full (extended) SQLite error code by bypassing standard JDBC and accessing the native SQLite driver result code.
(execute-batched! batch-sys sql-vec & [opts])Pushes a standard JDBC sql-vec to the batch writer and blocks for the result. Acts as a drop-in replacement for (jdbc/execute! ds ["..."] opts).
Pushes a standard JDBC sql-vec to the batch writer and blocks for the result. Acts as a drop-in replacement for (jdbc/execute! ds ["..."] opts).
(execute-batched-async! batch-sys sql-vec & [opts])Enqueues a write without waiting for SQL execution or commit. Blocks to apply backpressure if the bounded writer queue is full.
Enqueues a write without waiting for SQL execution or commit. Blocks to apply backpressure if the bounded writer queue is full.
(primary-err-code e)Masks the extended bits to return only the primary SQLite error category. Safe to use on both standard SQLExceptions and extended SQLiteExceptions.
Masks the extended bits to return only the primary SQLite error category. Safe to use on both standard SQLExceptions and extended SQLiteExceptions.
(retry-sqlite f
&
{:keys [retries base-delay-ms]
:or {retries 3 base-delay-ms 1000}})Retries (f) up to retries times on ANY flavor of SQLITE_BUSY (5) or SQLITE_LOCKED (6).
Uses randomized jitter for the delay to prevent thundering herd collisions.
Retries (f) up to `retries` times on ANY flavor of SQLITE_BUSY (5) or SQLITE_LOCKED (6). Uses randomized jitter for the delay to prevent thundering herd collisions.
(start-batch-writer! ds max-batch-size max-wait-ms global-builder-opts)(start-batch-writer! ds
max-batch-size
max-wait-ms
global-builder-opts
async-error-fn)Starts a background thread that pulls from req-ch and executes in time/size bounded batches. Returns a map with the input channel (:req-ch) and the thread completion channel (:worker-ch).
Starts a background thread that pulls from req-ch and executes in time/size bounded batches. Returns a map with the input channel (:req-ch) and the thread completion channel (:worker-ch).
(validate-batch-options! max-batch-size max-wait-ms)Throws if the batch writer's size or wait options are invalid.
Throws if the batch writer's size or wait options are invalid.
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 |