Configuration object for createClient.

Hierarchy

  • Config

Properties

authToken?: string

Authentication token for the database.

concurrency?: number

Concurrency limit.

By default, the client performs up to 20 concurrent requests. You can set this option to a higher number to increase the concurrency limit or set it to 0 to disable concurrency limits completely.

encryptionKey?: string

Encryption key for the database.

fetch?: Function

Custom fetch function to use for the HTTP client.

By default, the HTTP client uses fetch from the @libsql/isomorphic-fetch package, but you can pass your own function here. The argument to this function will be Request from @libsql/isomorphic-fetch, and it must return a promise that resolves to an object that is compatible with the Web Response.

intMode?: IntMode

How to convert SQLite integers to JavaScript values:

  • "number" (default): returns SQLite integers as JavaScript number-s (double precision floats). number cannot precisely represent integers larger than 2^53-1 in absolute value, so attempting to read larger integers will throw a RangeError.
  • "bigint": returns SQLite integers as JavaScript bigint-s (arbitrary precision integers). Bigints can precisely represent all SQLite integers.
  • "string": returns SQLite integers as strings.
syncInterval?: number

Sync interval in seconds.

syncUrl?: string

URL of a remote server to synchronize database with.

tls?: boolean

Enables or disables TLS for libsql: URLs.

By default, libsql: URLs use TLS. You can set this option to false to disable TLS.

url: string

The database URL.

The client supports libsql:, http:/https:, ws:/wss: and file: URL. For more infomation, please refer to the project README:

https://github.com/libsql/libsql-client-ts#supported-urls

Generated using TypeDoc