Optional
embeddingThe API key for the embedding service to use, or the EmbeddingHeadersProvider if using a provider that requires it (e.g. AWS bedrock).
Optional
ifOptional
keyspaceThe keyspace to use for the operation.
Optional
loggingThe configuration for logging events emitted by the DataAPIClient.
This can be set at any level of the major class hierarchy, and will be inherited by all child classes.
See DataAPILoggingConfig for much more information on configuration, outputs, and inheritance.
Optional
Beta
serdesAdvanced & currently somewhat unstable features related to customizing the table's ser/des behavior at a lower level.
Use with caution. See official DataStax documentation for more info.
Optional
timeoutThe method timeout override.
See TimeoutDescriptor for much more information.
Optional
timeoutThe default timeout options for any operation performed on this Table instance.
See TimeoutDescriptor for much more information about timeouts.
// The request timeout for all operations is set to 1000ms.
const client = new DataAPIClient('...', {
timeoutDefaults: { requestTimeoutMs: 1000 },
});
// The request timeout for all operations borne from this Db is set to 2000ms.
const db = client.db('...', {
timeoutDefaults: { requestTimeoutMs: 2000 },
});
The timeout options are inherited by all child classes, and can be overridden at any level, including the individual method level.
Individual-method-level overrides can vary in behavior depending on the method; again, see TimeoutDescriptor.
The default timeout options are as follows:
requestTimeoutMs
: 10000generalMethodTimeoutMs
: 30000collectionAdminTimeoutMs
: 60000tableAdminTimeoutMs
: 30000databaseAdminTimeoutMs
: 600000keyspaceAdminTimeoutMs
: 30000TimeoutDescriptor
Options for creating a new table (via Db.createTable).
See Db.createTable & Table for more information.
Field
definition - The bespoke columns/primary-key definition for the table.
Field
ifNotExists - Makes operation a no-op if the table already exists.
Field
keyspace - Overrides the keyspace for the table (from the
Db
's working keyspace).Field
embeddingApiKey - The embedding service's API-key/headers (for $vectorize)
Field
timeoutDefaults - Default timeouts for all table operations
Field
logging - Logging configuration overrides
Field
serdes - Additional serialization/deserialization configuration
Field
timeout - The timeout override for this method