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 CassandraClientArgs {
    applicationName?: string;
    applicationVersion?: string;
    authProvider?: AuthProvider;
    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;
    isMetadataSyncEnabled?: boolean;
    keyspace?: string;
    localDataCenter?: string;
    maxPrepared?: number;
    metrics?: ClientMetrics;
    monitorReporting?: {
        enabled?: boolean;
    };
    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;
}

Hierarchy (view full)

Properties

applicationName?: string
applicationVersion?: string
authProvider?: AuthProvider
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
isMetadataSyncEnabled?: boolean
keyspace?: string
localDataCenter?: string
maxPrepared?: number
metrics?: ClientMetrics
monitorReporting?: {
    enabled?: boolean;
}
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