Skip to content

Interface: PoolOptions ​

Defined in: packages/core/src/pool/pool.ts:8

Extends ​

Properties ​

PropertyTypeDescriptionInherited fromDefined in
acquireTimeoutMs?numberMax wait for a free connection before rejecting. Default 30000ms.-packages/core/src/pool/pool.ts:14
authPlugin?"Srp" | "Srp256" | "Legacy_Auth" | "auto"-ConnectInput.authPluginpackages/core/src/api/options.ts:116
autoUpgradeReadOnly?booleanDefault for TransactionOptions.autoUpgradeReadOnly: transparently upgrade a read-only transaction to read-write (commit + reopen + replay the failing statement once) when a write is attempted in it. Default false. See TransactionOptions.autoUpgradeReadOnly for the semantics.ConnectInput.autoUpgradeReadOnlypackages/core/src/api/options.ts:156
blobAsText?boolean-ConnectInput.blobAsTextpackages/core/src/api/options.ts:118
blobChunkSize?number-ConnectInput.blobChunkSizepackages/core/src/api/options.ts:220
blobReadAhead?BlobReadAheadOptionDefault lazy-blob read-ahead for queryStream (see BlobReadAheadOption).ConnectInput.blobReadAheadpackages/core/src/api/options.ts:132
blobReadChunkSize?number-ConnectInput.blobReadChunkSizepackages/core/src/api/options.ts:146
blobs?BlobsOptionDefault blob handling. - 'eager' (default): materialize during decode — text blobs (memos) arrive as strings, binary blobs as Buffers. - 'lazy': every blob column becomes a Blob handle. - 'lazy-binary': binary blobs lazy, text blobs (memos) eager — the file-export sweet spot. - 'lazy-text': text blobs lazy, binary blobs eager. - { default?, eager?: [cols], lazy?: [cols] }: per-column overrides on top of a base mode (see BlobColumnModes).ConnectInput.blobspackages/core/src/api/options.ts:130
blobWriteChunkSize?number-ConnectInput.blobWriteChunkSizepackages/core/src/api/options.ts:145
charset?stringConnection charset (lc_ctype). Default UTF8.ConnectInput.charsetpackages/core/src/api/options.ts:102
charsetNoneEncoding?string-ConnectInput.charsetNoneEncodingpackages/core/src/api/options.ts:186
charsetOverrides?Record<string, string>-ConnectInput.charsetOverridespackages/core/src/api/options.ts:188
connectTimeout?number-ConnectInput.connectTimeoutpackages/core/src/api/options.ts:221
connectTimeoutMs?number-ConnectInput.connectTimeoutMspackages/core/src/api/options.ts:109
databasestring-ConnectInput.databasepackages/core/src/api/options.ts:83
defaultTransaction?TransactionOptionsBaseline TransactionOptions for EVERY transaction this connection starts — explicit (startTransaction/transaction) and implicit (query/run/execute/executeBatch/queryStream/prepare/ executeScript) alike. Per-call options override individual fields; unset fields fall back to these defaults. Default {}, i.e. Firebird's classic snapshot / read-write / wait-with-no-timeout. High-concurrency example (read committed, bounded lock waits, reads stay GC-friendly, one-shot writes auto-upgrade and replay): defaultTransaction: { isolation: 'readCommitted', readOnly: true, wait: 5, autoUpgradeReadOnly: true } Exception: executeBatch always opens its implicit transaction read-write (it is DML by contract), overriding a readOnly: true default.ConnectInput.defaultTransactionpackages/core/src/api/options.ts:174
encoding?stringCompatibility alias for charset.ConnectInput.encodingpackages/core/src/api/options.ts:104
fetchSize?numberRows requested per fetch round trip.ConnectInput.fetchSizepackages/core/src/api/options.ts:148
host?string-ConnectInput.hostpackages/core/src/api/options.ts:81
idleTimeoutMs?numberIdle connections above min are closed after this long. Default 60000ms.-packages/core/src/pool/pool.ts:16
lowercase_keys?boolean-ConnectInput.lowercase_keyspackages/core/src/api/options.ts:218
lowercaseKeys?boolean-ConnectInput.lowercaseKeyspackages/core/src/api/options.ts:106
max?numberHard ceiling on open connections. Default 10.-packages/core/src/pool/pool.ts:12
maxBlobCacheSize?numberByte budget for received-but-unread inline blobs per connection (mirrors fbclient's blob cache). Overflow is silently dropped — those blobs read via the normal path. Default 10 MiB.ConnectInput.maxBlobCacheSizepackages/core/src/api/options.ts:144
maxInlineBlobSize?numberFB 5.0.2+ (protocol ≥ 19): blobs up to this size (bytes) ride INLINE with the row data — zero extra round trips for small blobs/memos. Clamped to 0–65535; 0 disables. Ignored by older servers. Default 65535.ConnectInput.maxInlineBlobSizepackages/core/src/api/options.ts:138
min?numberConnections kept warm even when idle. Default 0.-packages/core/src/pool/pool.ts:10
owner?string | nullFB6+: owner of a newly created database (createDatabase only; the attaching user must have the privilege to create databases for others, e.g. SYSDBA). Ignored on plain connect.ConnectInput.ownerpackages/core/src/api/options.ts:100
pageSize?number-ConnectInput.pageSizepackages/core/src/api/options.ts:107
password?string-ConnectInput.passwordpackages/core/src/api/options.ts:85
pluginName?string-ConnectInput.pluginNamepackages/core/src/api/options.ts:222
port?number-ConnectInput.portpackages/core/src/api/options.ts:82
retryConnectionInterval?number-ConnectInput.retryConnectionIntervalpackages/core/src/api/options.ts:219
role?string | null-ConnectInput.rolepackages/core/src/api/options.ts:87
searchPath?string | string[] | nullFB6+: initial schema search path for the session (unqualified-name resolution). Array or comma-separated string; FB6's default is PUBLIC, SYSTEM (SYSTEM is appended automatically if omitted). Pre-FB6 servers silently ignore it.ConnectInput.searchPathpackages/core/src/api/options.ts:94
statementCache?"keep" | "clear-on-release"What happens to a connection's statement cache when it returns to the pool: - 'keep' (default): cached prepared statements survive checkouts — each physical connection converges on the app's hot statement set, so later borrowers reuse warm statements (one round trip, no re-prepare); - 'clear-on-release': the cache is emptied at every release and the server handles are freed (DDL-friendly; the price is a re-prepare for every statement on the next checkout). How the unpinning actually works: while compiled statements exist, their attachment REFUSES to give up its relation locks, so DDL elsewhere blocks for its whole lock wait ("object in use"). Freeing them makes the attachment yield on demand — a WAITING recreate/alter/drop (any wait, including the 10s default) then proceeds in milliseconds. A wait: false DDL never asks the holder to yield and may still report "object in use"; only disconnection releases everything unconditionally.-packages/core/src/pool/pool.ts:37
statementCacheSize?numberPrepared statements kept per connection, keyed by SQL text (LRU). A cache hit makes repeat queries a single round trip. 0 disables. Default 64.ConnectInput.statementCacheSizepackages/core/src/api/options.ts:210
timeZones?"instant" | "zoned"How TIMESTAMP/TIME WITH TIME ZONE columns decode: - 'instant' (default): JS Date — the exact UTC instant; the stored zone id is dropped. - 'zoned': ZonedDate { date, zone } — same instant plus the zone ('Europe/Lisbon' or '+02:30'), round-trippable as a parameter. Connection-level only (column readers are cached per statement).ConnectInput.timeZonespackages/core/src/api/options.ts:184
transcodeAdapter?FirebirdTranscodeAdapter-ConnectInput.transcodeAdapterpackages/core/src/api/options.ts:187
transliterations?CharsetPage[]Transliteration pages: pluggable charset codecs matched by name against declared column charsets, charsetNoneEncoding, and charsetOverrides values. A user page here overrides the driver's built-in codec for the same name (including Buffer-native paths); names nothing claims fall back to the built-in pages and then iconv-lite. Build single-byte pages from a 256-character table with defineSingleBytePage (exported from @fast-firebird/core/charsets). import { defineSingleBytePage } from '@fast-firebird/core/charsets'; connect({ ..., transliterations: [defineSingleBytePage('MYPAGE', table256)] })ConnectInput.transliterationspackages/core/src/api/options.ts:203
user?string-ConnectInput.userpackages/core/src/api/options.ts:84
validateOnAcquire?booleanop_ping each connection on acquire; discard & replace if it fails. Default true.-packages/core/src/pool/pool.ts:18
wireCompression?booleanzlib wire compression (server needs WireCompression=true). Default off.ConnectInput.wireCompressionpackages/core/src/api/options.ts:113
wireCrypt?WireCryptOption-ConnectInput.wireCryptpackages/core/src/api/options.ts:111
wireCryptPlugin?"Arc4" | "ChaCha" | "ChaCha64"Wire-crypt cipher: 'Arc4' (default), 'ChaCha' or 'ChaCha64' (FB4+).ConnectInput.wireCryptPluginpackages/core/src/api/options.ts:115

MIT Licensed. Contains data derived from the Firebird project under IDPL/IPL.