Skip to content

Interface: SQLAdapterConfiguration

Configuration schema for the SQL Adapter.

This schema is similar to the Knex configuration schema, but with some additional fields specific to the SQL Adapter, and omitting some fields which could cause issues with the SQL Adapter.

Properties

PropertyTypeDescription
acquireConnectionTimeout?numberThe maximum time in milliseconds to wait for a connection to be acquired from the pool before timing out.
client?SQLClientThe database client to use, such as 'pg' for PostgreSQL, 'mysql2' for MySQL, etc.
connection?string | StaticConnectionConfig | ConnectionConfigProviderThe connection configuration for the database. This can be a connection string or an object with connection parameters.
debug?booleanEnables debug mode for the adapter, causing all queries to be logged and async stack traces to be captured for easier troubleshooting.
enforceEnqueueSequence?booleanWhether to enforce the sequence of job enqueueing. If set to true, jobs will be enqueued in the order they are provided. Defaults to false.
jsonbSupport?booleanWhether to use JSONB support for PostgreSQL databases. If set to true, the adapter will use JSONB columns for storing job data, which can improve performance and reduce storage space.
lockAcquisitionConcurrency?numberControls how many locks can be acquired in parallel when acquiring locks for job processing. Defaults to 100.
maxBulkInsertRows?numberControls how many jobs can be attempted in a single insert statement (i.e., one SQL statement with multiple rows). Defaults to 1000.
maxIndividualInsertConcurrency?numberControls how many single row inserts can be performed in parallel when falling back to per-job insertion. Defaults to 10.
migrate?booleanEnable or disable automatic schema migrations at startup. Defaults to true.
pool?PoolConfigDefines the settings for the database connection pool, controlling how many connections can be opened, reused, and managed concurrently.
schema?stringThe schema to use for the SQL Adapter tables. If not specified, it defaults to the default setting of the database driver.
tablePrefix?stringThe prefix to use for the SQL Adapter tables. This is useful for avoiding table name collisions in shared databases. If not specified, it defaults to kyoo_.
version?stringSpecifies the database version or dialect variant to help Knex adjust its SQL generation and feature support when using non-standard or version-sensitive clients.