Extends the DataStax driver's client options with additional configurations for service providers, enabling the customization of Cassandra client instances based on specific service requirements. This interface integrates native driver configurations with custom extensions, facilitating the connection to Cassandra databases, including managed services like Astra DB.

  • serviceProviderArgs: Optional. Contains the connection arguments for specific Cassandra service providers, such as Astra DB. This allows for detailed and service-specific client configurations, enhancing connectivity and functionality across different Cassandra environments.

Incorporating this interface into client creation processes ensures a comprehensive setup, encompassing both standard and extended options for robust and versatile Cassandra database interactions.

interface CassandraLibArgs {
    dimensions: number;
    keyspace: string;
    primaryKey: Column | Column[];
    table: string;
    applicationName?: string;
    applicationVersion?: string;
    authProvider?: AuthProvider;
    batchSize?: number;
    cloud?: {
        secureConnectBundle: string | URL;
    };
    contactPoints?: string[];
    credentials?: {
        password: string;
        username: string;
    };
    encoding?: {
        copyBuffer?: boolean;
        map?: Function;
        set?: Function;
        useBigIntAsLong?: boolean;
        useBigIntAsVarint?: boolean;
        useUndefinedAsUnset?: boolean;
    };
    graphOptions?: GraphOptions;
    id?: Uuid;
    indices?: Index[];
    isMetadataSyncEnabled?: boolean;
    localDataCenter?: string;
    maxPrepared?: number;
    metadataColumns?: Column[];
    metrics?: ClientMetrics;
    monitorReporting?: {
        enabled?: boolean;
    };
    nonKeyColumns?: Column | Column[];
    policies?: {
        addressResolution?: AddressTranslator;
        loadBalancing?: LoadBalancingPolicy;
        reconnection?: ReconnectionPolicy;
        retry?: RetryPolicy;
        speculativeExecution?: SpeculativeExecutionPolicy;
        timestampGeneration?: TimestampGenerator;
    };
    pooling?: {
        coreConnectionsPerHost?: {
            [key: number]: number;
        };
        heartBeatInterval?: number;
        maxRequestsPerConnection?: number;
        warmup?: boolean;
    };
    prepareOnAllHosts?: boolean;
    profiles?: ExecutionProfile[];
    promiseFactory?: ((handler: ((callback: ((err: Error, result?: any) => void)) => void)) => Promise<any>);
    protocolOptions?: {
        maxSchemaAgreementWaitSeconds?: number;
        maxVersion?: number;
        noCompact?: boolean;
        port?: number;
    };
    queryOptions?: QueryOptions;
    rePrepareOnUp?: boolean;
    refreshSchemaDelay?: number;
    requestTracker?: RequestTracker;
    serviceProviderArgs?: CassandraServiceProviderArgs;
    socketOptions?: {
        coalescingThreshold?: number;
        connectTimeout?: number;
        defunctReadTimeoutThreshold?: number;
        keepAlive?: boolean;
        keepAliveDelay?: number;
        readTimeout?: number;
        tcpNoDelay?: boolean;
    };
    sslOptions?: ConnectionOptions;
    vectorType?: SupportedVectorTypes;
    withClause?: string;
}

Hierarchy (view full)

Properties

dimensions: number
keyspace: string
primaryKey: Column | Column[]
table: string
applicationName?: string
applicationVersion?: string
authProvider?: AuthProvider
batchSize?: number
cloud?: {
    secureConnectBundle: string | URL;
}
contactPoints?: string[]
credentials?: {
    password: string;
    username: string;
}
encoding?: {
    copyBuffer?: boolean;
    map?: Function;
    set?: Function;
    useBigIntAsLong?: boolean;
    useBigIntAsVarint?: boolean;
    useUndefinedAsUnset?: boolean;
}
graphOptions?: GraphOptions
id?: Uuid
indices?: Index[]
isMetadataSyncEnabled?: boolean
localDataCenter?: string
maxPrepared?: number
metadataColumns?: Column[]
metrics?: ClientMetrics
monitorReporting?: {
    enabled?: boolean;
}
nonKeyColumns?: Column | Column[]
policies?: {
    addressResolution?: AddressTranslator;
    loadBalancing?: LoadBalancingPolicy;
    reconnection?: ReconnectionPolicy;
    retry?: RetryPolicy;
    speculativeExecution?: SpeculativeExecutionPolicy;
    timestampGeneration?: TimestampGenerator;
}
pooling?: {
    coreConnectionsPerHost?: {
        [key: number]: number;
    };
    heartBeatInterval?: number;
    maxRequestsPerConnection?: number;
    warmup?: boolean;
}
prepareOnAllHosts?: boolean
profiles?: ExecutionProfile[]
promiseFactory?: ((handler: ((callback: ((err: Error, result?: any) => void)) => void)) => Promise<any>)
protocolOptions?: {
    maxSchemaAgreementWaitSeconds?: number;
    maxVersion?: number;
    noCompact?: boolean;
    port?: number;
}
queryOptions?: QueryOptions
rePrepareOnUp?: boolean
refreshSchemaDelay?: number
requestTracker?: RequestTracker
serviceProviderArgs?: CassandraServiceProviderArgs
socketOptions?: {
    coalescingThreshold?: number;
    connectTimeout?: number;
    defunctReadTimeoutThreshold?: number;
    keepAlive?: boolean;
    keepAliveDelay?: number;
    readTimeout?: number;
    tcpNoDelay?: boolean;
}
sslOptions?: ConnectionOptions
withClause?: string