Interface RunCommandOptions

Options for executing some arbitrary command.

See

Db.command

interface RunCommandOptions {
    collection?: string;
    extraLogInfo?: Record<string, unknown>;
    keyspace?: null | string;
    table?: string;
    timeout?: number | Pick<Partial<TimeoutDescriptor>, "requestTimeoutMs" | "generalMethodTimeoutMs">;
}

Hierarchy (view full)

Properties

collection?: string

The collection to run the command on.

If not provided, the command will run on the keyspace, or directly on the database if keyspace is null.

Only one of this or RunCommandOptions.table should be provided.

extraLogInfo?: Record<string, unknown>

A small string to add to the log message for this command (only if you're printing to stdout/stderr using LoggingConfig).

keyspace?: null | string

Overrides the keyspace to run the command on.

If undefined/not provided, the command will run on the db's default working keyspace.

This may be set to null to run the command directly on the database.

table?: string

The collection to run the command on.

If not provided, the command will run on the keyspace, or directly on the database if keyspace is null.

Only one of this or RunCommandOptions.table should be provided.

timeout?: number | Pick<Partial<TimeoutDescriptor>, "requestTimeoutMs" | "generalMethodTimeoutMs">

The method timeout override.

See TimeoutDescriptor for much more information.