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
Property | Type | Description |
---|---|---|
acquireConnectionTimeout? | number | The maximum time in milliseconds to wait for a connection to be acquired from the pool before timing out. |
client? | SQLClient | The database client to use, such as 'pg' for PostgreSQL, 'mysql2' for MySQL, etc. |
connection? | string | StaticConnectionConfig | ConnectionConfigProvider | The connection configuration for the database. This can be a connection string or an object with connection parameters. |
debug? | boolean | Enables debug mode for the adapter, causing all queries to be logged and async stack traces to be captured for easier troubleshooting. |
enforceEnqueueSequence? | boolean | Whether 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? | boolean | Whether 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? | number | Controls how many locks can be acquired in parallel when acquiring locks for job processing. Defaults to 100 . |
maxBulkInsertRows? | number | Controls how many jobs can be attempted in a single insert statement (i.e., one SQL statement with multiple rows). Defaults to 1000 . |
maxIndividualInsertConcurrency? | number | Controls how many single row inserts can be performed in parallel when falling back to per-job insertion. Defaults to 10 . |
migrate? | boolean | Enable or disable automatic schema migrations at startup. Defaults to true . |
pool? | PoolConfig | Defines the settings for the database connection pool, controlling how many connections can be opened, reused, and managed concurrently. |
schema? | string | The schema to use for the SQL Adapter tables. If not specified, it defaults to the default setting of the database driver. |
tablePrefix? | string | The 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? | string | Specifies the database version or dialect variant to help Knex adjust its SQL generation and feature support when using non-standard or version-sensitive clients. |