package options

import "github.com/datastax/astra-db-go/v2/astra/options"

Package options provides options, types, and utilities for Astra DB operations.

Index

Constants

const DefaultDatabasePollInterval = 10 * time.Second

DefaultDatabasePollInterval is the default interval for polling database status.

const DefaultKeyspacePollInterval = 1 * time.Second

DefaultKeyspacePollInterval is the default interval for polling keyspace operations.

Functions

func API

func API() *apiOptionsBuilder

API creates a new builder for APIOptions.

func AlterTable

func AlterTable() *alterTableOptionsBuilder

AlterTable creates a new builder for AlterTableOptions.

func AlterType

func AlterType() *alterTypeOptionsBuilder

AlterType creates a new builder for AlterTypeOptions.

func CollectionCountDocuments

func CollectionCountDocuments() *collectionCountDocumentsOptionsBuilder

CollectionCountDocuments creates a new builder for CollectionCountDocumentsOptions.

func CollectionDefaultId

func CollectionDefaultId() *collectionDefaultIdOptionsBuilder

CollectionDefaultId creates a new builder for CollectionDefaultIdOptions.

func CollectionDeleteMany

func CollectionDeleteMany() *collectionDeleteManyOptionsBuilder

CollectionDeleteMany creates a new builder for CollectionDeleteManyOptions.

func CollectionDeleteOne

func CollectionDeleteOne() *collectionDeleteOneOptionsBuilder

CollectionDeleteOne creates a new builder for CollectionDeleteOneOptions.

func CollectionEstimatedDocumentCount

func CollectionEstimatedDocumentCount() *collectionEstimatedDocumentCountOptionsBuilder

CollectionEstimatedDocumentCount creates a new builder for CollectionEstimatedDocumentCountOptions.

func CollectionFind

func CollectionFind() *collectionFindOptionsBuilder

CollectionFind creates a new builder for CollectionFindOptions.

func CollectionFindAndRerank

func CollectionFindAndRerank() *collectionFindAndRerankOptionsBuilder

CollectionFindAndRerank creates a new builder for CollectionFindAndRerankOptions.

func CollectionFindOne

func CollectionFindOne() *collectionFindOneOptionsBuilder

CollectionFindOne creates a new builder for CollectionFindOneOptions.

func CollectionFindOneAndDelete

func CollectionFindOneAndDelete() *collectionFindOneAndDeleteOptionsBuilder

CollectionFindOneAndDelete creates a new builder for CollectionFindOneAndDeleteOptions.

func CollectionFindOneAndReplace

func CollectionFindOneAndReplace() *collectionFindOneAndReplaceOptionsBuilder

CollectionFindOneAndReplace creates a new builder for CollectionFindOneAndReplaceOptions.

func CollectionFindOneAndUpdate

func CollectionFindOneAndUpdate() *collectionFindOneAndUpdateOptionsBuilder

CollectionFindOneAndUpdate creates a new builder for CollectionFindOneAndUpdateOptions.

func CollectionInsertMany

func CollectionInsertMany() *collectionInsertManyOptionsBuilder

CollectionInsertMany creates a new builder for CollectionInsertManyOptions.

func CollectionInsertOne

func CollectionInsertOne() *collectionInsertOneOptionsBuilder

CollectionInsertOne creates a new builder for CollectionInsertOneOptions.

func CollectionOptions

func CollectionOptions() *collectionOptionsOptionsBuilder

CollectionOptions creates a new builder for CollectionOptionsOptions.

func CollectionReplaceOne

func CollectionReplaceOne() *collectionReplaceOneOptionsBuilder

CollectionReplaceOne creates a new builder for CollectionReplaceOneOptions.

func CollectionUpdateMany

func CollectionUpdateMany() *collectionUpdateManyOptionsBuilder

CollectionUpdateMany creates a new builder for CollectionUpdateManyOptions.

func CollectionUpdateOne

func CollectionUpdateOne() *collectionUpdateOneOptionsBuilder

CollectionUpdateOne creates a new builder for CollectionUpdateOneOptions.

func CreateCollection

func CreateCollection() *createCollectionOptionsBuilder

CreateCollection creates a new builder for CreateCollectionOptions.

func CreateDatabase

func CreateDatabase() *createDatabaseOptionsBuilder

CreateDatabase creates a new builder for CreateDatabaseOptions.

func CreateIndex

func CreateIndex() *createIndexOptionsBuilder

CreateIndex creates a new builder for CreateIndexOptions.

func CreateKeyspace

func CreateKeyspace() *createKeyspaceOptionsBuilder

CreateKeyspace creates a new builder for CreateKeyspaceOptions.

func CreateTable

func CreateTable() *createTableOptionsBuilder

CreateTable creates a new builder for CreateTableOptions.

func CreateTextIndex

func CreateTextIndex() *createTextIndexOptionsBuilder

CreateTextIndex creates a new builder for CreateTextIndexOptions.

func CreateType

func CreateType() *createTypeOptionsBuilder

CreateType creates a new builder for CreateTypeOptions.

func CreateVectorIndex

func CreateVectorIndex() *createVectorIndexOptionsBuilder

CreateVectorIndex creates a new builder for CreateVectorIndexOptions.

func DatabaseInfo

func DatabaseInfo() *databaseInfoOptionsBuilder

DatabaseInfo creates a new builder for DatabaseInfoOptions.

func DropCollection

func DropCollection() *dropCollectionOptionsBuilder

DropCollection creates a new builder for DropCollectionOptions.

func DropDatabase

func DropDatabase() *dropDatabaseOptionsBuilder

DropDatabase creates a new builder for DropDatabaseOptions.

func DropKeyspace

func DropKeyspace() *dropKeyspaceOptionsBuilder

DropKeyspace creates a new builder for DropKeyspaceOptions.

func DropTable

func DropTable() *dropTableOptionsBuilder

DropTable creates a new builder for DropTableOptions.

func DropTableIndex

func DropTableIndex() *dropTableIndexOptionsBuilder

DropTableIndex creates a new builder for DropTableIndexOptions.

func DropType

func DropType() *dropTypeOptionsBuilder

DropType creates a new builder for DropTypeOptions.

func FindAvailableRegions

func FindAvailableRegions() *findAvailableRegionsOptionsBuilder

FindAvailableRegions creates a new builder for FindAvailableRegionsOptions.

func FindEmbeddingProviders

func FindEmbeddingProviders() *findEmbeddingProvidersOptionsBuilder

FindEmbeddingProviders creates a new builder for FindEmbeddingProvidersOptions.

func GetCollection

func GetCollection() *getCollectionOptionsBuilder

GetCollection creates a new builder for GetCollectionOptions.

func GetTable

func GetTable() *getTableOptionsBuilder

GetTable creates a new builder for GetTableOptions.

func Indexing

func Indexing() *indexingOptionsBuilder

Indexing creates a new builder for IndexingOptions.

func Lexical

func Lexical() *lexicalOptionsBuilder

Lexical creates a new builder for LexicalOptions.

func ListCollections

func ListCollections() *listCollectionsOptionsBuilder

ListCollections creates a new builder for ListCollectionsOptions.

func ListDatabases

func ListDatabases() *listDatabasesOptionsBuilder

ListDatabases creates a new builder for ListDatabasesOptions.

func ListIndexes

func ListIndexes() *listIndexesOptionsBuilder

ListIndexes creates a new builder for ListIndexesOptions.

func ListKeyspaces

func ListKeyspaces() *listKeyspacesOptionsBuilder

ListKeyspaces creates a new builder for ListKeyspacesOptions.

func ListTables

func ListTables() *listTablesOptionsBuilder

ListTables creates a new builder for ListTablesOptions.

func ListTypes

func ListTypes() *listTypesOptionsBuilder

ListTypes creates a new builder for ListTypesOptions.

func Merge

func Merge[T any](opts ...Builder[T]) *T

Merge merges multiple Builder options into a single options struct. It starts with a default-initialized struct and then applies each option's setters sequentially, with later options overriding earlier ones. Note: result will never be nil and will always have defaults applied.

func MergeAndValidate

func MergeAndValidate[T any](opts ...Builder[T]) (*T, error)

MergeAndValidate merges multiple Builder options into a single options struct and then recursively validates the result.

func MergeInto

func MergeInto[T any](target **T, opts ...Builder[T])

MergeInto merges multiple Builder options into an existing options struct. It initializes the target if it is nil and applies each option's setters sequentially.

func NoopBuilder

func NoopBuilder[T any](src *T) []func(*T)

NoopBuilder returns a Builder implementation that just copies from the source to the target.

func Rerank

func Rerank() *rerankOptionsBuilder

Rerank creates a new builder for RerankOptions.

func RerankService

func RerankService() *rerankServiceOptionsBuilder

RerankService creates a new builder for RerankServiceOptions.

func Serdes

func Serdes() *serdesOptionsBuilder

Serdes creates a new builder for SerdesOptions.

func TableDefinition

func TableDefinition() *tableDefinitionOptionsBuilder

TableDefinition creates a new builder for TableDefinitionOptions.

func TableDeleteMany

func TableDeleteMany() *tableDeleteManyOptionsBuilder

TableDeleteMany creates a new builder for TableDeleteManyOptions.

func TableDeleteOne

func TableDeleteOne() *tableDeleteOneOptionsBuilder

TableDeleteOne creates a new builder for TableDeleteOneOptions.

func TableFind

func TableFind() *tableFindOptionsBuilder

TableFind creates a new builder for TableFindOptions.

func TableFindOne

func TableFindOne() *tableFindOneOptionsBuilder

TableFindOne creates a new builder for TableFindOneOptions.

func TableInsertMany

func TableInsertMany() *tableInsertManyOptionsBuilder

TableInsertMany creates a new builder for TableInsertManyOptions.

func TableInsertOne

func TableInsertOne() *tableInsertOneOptionsBuilder

TableInsertOne creates a new builder for TableInsertOneOptions.

func TableUpdateOne

func TableUpdateOne() *tableUpdateOneOptionsBuilder

TableUpdateOne creates a new builder for TableUpdateOneOptions.

func Timeout

func Timeout() *timeoutOptionsBuilder

Timeout creates a new builder for TimeoutOptions.

func Vector

func Vector() *vectorOptionsBuilder

Vector creates a new builder for VectorOptions.

func VectorService

func VectorService() *vectorServiceOptionsBuilder

VectorService creates a new builder for VectorServiceOptions.

Types

type APIOption

type APIOption = Builder[APIOptions]

APIOption is a Builder that modifies APIOptions.

type APIOptions

type APIOptions struct {
	// TokenProvider is the authentication token provider for Astra DB
	TokenProvider TokenProvider

	// Keyspace is the keyspace to use for operations
	Keyspace *string

	// APIVersion is the Data API version (e.g., "v1")
	APIVersion *string

	// HTTPClient is the HTTP client to use for requests
	HTTPClient *http.Client

	// Headers contains custom headers to include in requests
	// (e.g., for embedding API keys like "x-embedding-api-key")
	Headers Headers

	// Timeout contains timeout configuration
	Timeout *TimeoutOptions `optlift:"Request:RequestTimeout,Connection:ConnectionTimeout,BulkOperation:BulkOperationTimeout,GeneralMethod:GeneralMethodTimeout"`

	// Serdes contains serialization/deserialization options
	Serdes *SerdesOptions

	// WarningHandler is called for each warning received from the API.
	// Set this at any level (Client, Database, Collection/Table, or Command).
	WarningHandler WarningHandler

	// AstraEnvironment is the Astra environment (prod, dev, test).
	// Controls the DevOps API URL. Defaults to prod.
	AstraEnvironment *AstraEnvironment

	// DataAPIBackend is the database backend (astra, hcd, dse, cassandra, other).
	// Controls the Data API path. Defaults to astra.
	DataAPIBackend *DataAPIBackend

	// Callers contains information about the application making the request
	Callers Callers

	// EmbeddingHeaderProvider provides headers for embedding services (e.g. $vectorize).
	EmbeddingHeadersProvider EmbeddingHeadersProvider

	// RerankingHeaderProvider provides headers for reranking services (e.g. $lexical).
	RerankingHeadersProvider RerankingHeadersProvider
}

APIOptions contains all configurable options that can be set at any level in the client hierarchy (Client -> Database -> Collection/Table -> Command). Options set at a lower level override those set at a higher level.

func (*APIOptions) Children
func (o *APIOptions) Children() []any

Children implements ChildValidator for APIOptions. Returns all non-nil option fields.

func (*APIOptions) GetAPIVersion
func (o *APIOptions) GetAPIVersion() string

GetAPIVersion returns the API version or "v1" if not set.

func (*APIOptions) GetAstraEnvironment
func (o *APIOptions) GetAstraEnvironment() AstraEnvironment

GetAstraEnvironment returns the Astra environment or AstraEnvironmentProd if not set.

func (*APIOptions) GetDataAPIBackend
func (o *APIOptions) GetDataAPIBackend() DataAPIBackend

GetDataAPIBackend returns the database backend or DataAPIBackendAstra if not set.

func (*APIOptions) GetDesFlags
func (o *APIOptions) GetDesFlags() serdes.DesFlags

GetDesFlags returns the deserialization flags or 0 if not set.

func (*APIOptions) GetGeneralMethodTimeout
func (o *APIOptions) GetGeneralMethodTimeout() *time.Duration

GetGeneralMethodTimeout returns the general method timeout or nil if not set.

func (*APIOptions) GetHTTPClient
func (o *APIOptions) GetHTTPClient() *http.Client

GetHTTPClient returns the HTTP client or a default one if not set.

func (*APIOptions) GetKeyspace
func (o *APIOptions) GetKeyspace() string

GetKeyspace returns the keyspace or "default_keyspace" if not set.

func (*APIOptions) GetRequestTimeout
func (o *APIOptions) GetRequestTimeout() time.Duration

GetRequestTimeout returns the request timeout or 30 seconds if not set.

func (*APIOptions) GetSerFlags
func (o *APIOptions) GetSerFlags() serdes.SerFlags

GetSerFlags returns the serialization flags or 0 if not set.

func (*APIOptions) GetTimeout
func (o *APIOptions) GetTimeout() *TimeoutOptions

GetTimeout returns the timeout configuration.

func (*APIOptions) GetTokenProvider
func (o *APIOptions) GetTokenProvider() TokenProvider

GetTokenProvider returns the token provider or nil if not set.

func (*APIOptions) Setters
func (o *APIOptions) Setters() []func(*APIOptions)

Setters implements Builder[APIOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[APIOptions].

type AlterTableOption

type AlterTableOption = Builder[AlterTableOptions]

AlterTableOption configures a AlterTable operation. You can use the fluent-style builder or a pointer to AlterTableOptions interchangeably.

Example using the fluent builder (AlterTable):

opts := options.AlterTable().SetAPIOptions(...)

Example using a pointer to AlterTableOptions without the fluent builder:

opts := &options.AlterTableOptions{...}

type AlterTableOptions

type AlterTableOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Table→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

AlterTableOptions represents options for altering a table. Right now this is empty except for APIOptions, but leaving it here for future-proofing.

func (*AlterTableOptions) Children
func (o *AlterTableOptions) Children() []any

Children implements ChildValidator for AlterTableOptions. Returns all non-nil option fields.

func (*AlterTableOptions) Setters
func (o *AlterTableOptions) Setters() []func(*AlterTableOptions)

Setters implements Builder[AlterTableOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[AlterTableOptions].

type AlterTypeOption

type AlterTypeOption = Builder[AlterTypeOptions]

AlterTypeOption configures a AlterType operation. You can use the fluent-style builder or a pointer to AlterTypeOptions interchangeably.

Example using the fluent builder (AlterType):

// No need to use pointer for builder; the builder handles that for you.
opts := options.AlterType().SetKeyspace("value")

Example using a pointer to AlterTypeOptions without the fluent builder:

opts := &options.AlterTypeOptions{Keyspace: ptr.To("value")}

type AlterTypeOptions

type AlterTypeOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Command hierarchy.
	APIOptions *APIOptions `json:"-" optlift:"Keyspace"`
}

AlterTypeOptions represents options for altering a user-defined type.

func (*AlterTypeOptions) Children
func (o *AlterTypeOptions) Children() []any

Children implements ChildValidator for AlterTypeOptions. Returns all non-nil option fields.

func (*AlterTypeOptions) Setters
func (o *AlterTypeOptions) Setters() []func(*AlterTypeOptions)

Setters implements Builder[AlterTypeOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[AlterTypeOptions].

type AstraEnvironment

type AstraEnvironment string

AstraEnvironment represents which Astra environment to target (controls DevOps API URL).

const (
	// AstraEnvironmentProd is the Astra production environment.
	AstraEnvironmentProd AstraEnvironment = "prod"
	// AstraEnvironmentDev is the Astra development environment.
	AstraEnvironmentDev AstraEnvironment = "dev"
	// AstraEnvironmentTest is the Astra test environment.
	AstraEnvironmentTest AstraEnvironment = "test"
)
func ParseAstraEndpoint
func ParseAstraEndpoint(endpoint string) (id, region string, env AstraEnvironment)

ParseAstraEndpoint extracts the database UUID, region, and AstraEnvironment from an Astra Data API endpoint. Returns empty strings and prod env if the endpoint does not match the expected Astra format. Expected format: https://{uuid}-{region}.apps.astra[-dev|-test].datastax.com

func (AstraEnvironment) AstraDBEndpoint
func (e AstraEnvironment) AstraDBEndpoint(id, region string) string

AstraDBEndpoint returns the Data API endpoint for an Astra database.

func (AstraEnvironment) DevOpsURL
func (e AstraEnvironment) DevOpsURL() string

DevOpsURL returns the Astra DevOps API base URL for this environment.

type Builder

type Builder[T any] interface {
	Setters() []func(*T)
}

Builder is an interface that wraps a Setters method to return a slice of option setters. This follows the MongoDB Go driver pattern for composable options.

type Caller

type Caller struct {
	Name    string
	Version string
}

Caller represents information about the application making the request.

type Callers

type Callers []Caller

Callers is a custom slice type that implements ShouldMerge to accumulate callers additively.

func (Callers) Merge
func (c Callers) Merge(other ShouldMerge) ShouldMerge

Merge implements ShouldMerge for Callers.

type ChildValidator

type ChildValidator interface {
	Children() []any
}

ChildValidator is an optional interface that options types can implement to return nested validators for hierarchical validation. If a type implements ChildValidator, MergeAndValidate calls Validate on all children. This will be codegen'd for any struct with nested Validator structs.

type CloudProviderFilter

type CloudProviderFilter string

CloudProviderFilter controls which databases are returned by ListDatabases based on cloud provider.

const (
	// CloudProviderAll returns databases from all cloud providers (default).
	CloudProviderAll CloudProviderFilter = "ALL"
	// CloudProviderGCP returns only GCP databases.
	CloudProviderGCP CloudProviderFilter = "GCP"
	// CloudProviderAWS returns only AWS databases.
	CloudProviderAWS CloudProviderFilter = "AWS"
	// CloudProviderAzure returns only Azure databases.
	CloudProviderAzure CloudProviderFilter = "AZURE"
)

type CollectionCountDocumentsOption

type CollectionCountDocumentsOption = Builder[CollectionCountDocumentsOptions]

CollectionCountDocumentsOption configures a CollectionCountDocuments operation. You can use the fluent-style builder or a pointer to CollectionCountDocumentsOptions interchangeably.

Example using the fluent builder (CollectionCountDocuments):

opts := options.CollectionCountDocuments().SetAPIOptions(...)

Example using a pointer to CollectionCountDocumentsOptions without the fluent builder:

opts := &options.CollectionCountDocumentsOptions{...}

type CollectionCountDocumentsOptions

type CollectionCountDocumentsOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Collection→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

CollectionCountDocumentsOptions represents options for the countDocuments command. Right now this is empty except for APIOptions, but leaving it here for future-proofing.

func (*CollectionCountDocumentsOptions) Children
func (o *CollectionCountDocumentsOptions) Children() []any

Children implements ChildValidator for CollectionCountDocumentsOptions. Returns all non-nil option fields.

func (*CollectionCountDocumentsOptions) Setters
func (o *CollectionCountDocumentsOptions) Setters() []func(*CollectionCountDocumentsOptions)

Setters implements Builder[CollectionCountDocumentsOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CollectionCountDocumentsOptions].

type CollectionDefaultIdOption

type CollectionDefaultIdOption = Builder[CollectionDefaultIdOptions]

CollectionDefaultIdOption configures a CollectionDefaultId operation. You can use the fluent-style builder or a pointer to CollectionDefaultIdOptions interchangeably.

Example using the fluent builder (CollectionDefaultId):

opts := options.CollectionDefaultId().SetType(...)

Example using a pointer to CollectionDefaultIdOptions without the fluent builder:

opts := &options.CollectionDefaultIdOptions{...}

type CollectionDefaultIdOptions

type CollectionDefaultIdOptions struct {
	// Type is the type of the default ID that the API should generate if no ID is provided in the inserted document.
	// Valid values: "uuid", "uuidv6", "uuidv7", "objectId".
	// If not specified, the default ID will be a string UUID.
	Type *DefaultIdType `json:"type,omitempty"`
}

CollectionDefaultIdOptions represents the options for a collection's default ID.

If `type` is not specified, the default ID will be a string UUID.

func (*CollectionDefaultIdOptions) Setters
func (o *CollectionDefaultIdOptions) Setters() []func(*CollectionDefaultIdOptions)

Setters implements Builder[CollectionDefaultIdOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CollectionDefaultIdOptions].

type CollectionDeleteManyOption

type CollectionDeleteManyOption = Builder[CollectionDeleteManyOptions]

CollectionDeleteManyOption configures a CollectionDeleteMany operation. You can use the fluent-style builder or a pointer to CollectionDeleteManyOptions interchangeably.

Example using the fluent builder (CollectionDeleteMany):

// No need to use pointer for builder; the builder handles that for you.
opts := options.CollectionDeleteMany().SetTimeout(10 * time.Second)

Example using a pointer to CollectionDeleteManyOptions without the fluent builder:

opts := &options.CollectionDeleteManyOptions{Timeout: ptr.To(10 * time.Second)}

type CollectionDeleteManyOptions

type CollectionDeleteManyOptions struct {
	// Timeout is the overall timeout for the entire paginated operation.
	// Overrides the GeneralMethod timeout from the hierarchy. Client-side only.
	Timeout *time.Duration `json:"-"`
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Collection→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

CollectionDeleteManyOptions represents options for a deleteMany operation.

func (*CollectionDeleteManyOptions) Children
func (o *CollectionDeleteManyOptions) Children() []any

Children implements ChildValidator for CollectionDeleteManyOptions. Returns all non-nil option fields.

func (*CollectionDeleteManyOptions) Setters
func (o *CollectionDeleteManyOptions) Setters() []func(*CollectionDeleteManyOptions)

Setters implements Builder[CollectionDeleteManyOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CollectionDeleteManyOptions].

type CollectionDeleteOneOption

type CollectionDeleteOneOption = Builder[CollectionDeleteOneOptions]

CollectionDeleteOneOption configures a CollectionDeleteOne operation. You can use the fluent-style builder or a pointer to CollectionDeleteOneOptions interchangeably.

Example using the fluent builder (CollectionDeleteOne):

opts := options.CollectionDeleteOne().SetSort(...)

Example using a pointer to CollectionDeleteOneOptions without the fluent builder:

opts := &options.CollectionDeleteOneOptions{...}

type CollectionDeleteOneOptions

type CollectionDeleteOneOptions struct {
	// Sort specifies the sort order to apply before selecting the document to delete.
	// This determines which document is deleted when the filter matches multiple documents.
	Sort sort.Sortable `json:"sort,omitempty"`
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Collection→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

CollectionDeleteOneOptions represents options for a deleteOne operation.

func (*CollectionDeleteOneOptions) Children
func (o *CollectionDeleteOneOptions) Children() []any

Children implements ChildValidator for CollectionDeleteOneOptions. Returns all non-nil option fields.

func (*CollectionDeleteOneOptions) Setters
func (o *CollectionDeleteOneOptions) Setters() []func(*CollectionDeleteOneOptions)

Setters implements Builder[CollectionDeleteOneOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CollectionDeleteOneOptions].

type CollectionEstimatedDocumentCountOption

type CollectionEstimatedDocumentCountOption = Builder[CollectionEstimatedDocumentCountOptions]

CollectionEstimatedDocumentCountOption configures a CollectionEstimatedDocumentCount operation. You can use the fluent-style builder or a pointer to CollectionEstimatedDocumentCountOptions interchangeably.

Example using the fluent builder (CollectionEstimatedDocumentCount):

opts := options.CollectionEstimatedDocumentCount().SetAPIOptions(...)

Example using a pointer to CollectionEstimatedDocumentCountOptions without the fluent builder:

opts := &options.CollectionEstimatedDocumentCountOptions{...}

type CollectionEstimatedDocumentCountOptions

type CollectionEstimatedDocumentCountOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Collection→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

CollectionEstimatedDocumentCountOptions represents options for the estimatedDocumentCount command. Right now this is empty except for APIOptions, but leaving it here for future-proofing.

func (*CollectionEstimatedDocumentCountOptions) Children
func (o *CollectionEstimatedDocumentCountOptions) Children() []any

Children implements ChildValidator for CollectionEstimatedDocumentCountOptions. Returns all non-nil option fields.

func (*CollectionEstimatedDocumentCountOptions) Setters
func (o *CollectionEstimatedDocumentCountOptions) Setters() []func(*CollectionEstimatedDocumentCountOptions)

Setters implements Builder[CollectionEstimatedDocumentCountOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CollectionEstimatedDocumentCountOptions].

type CollectionFindAndRerankOption

type CollectionFindAndRerankOption = Builder[CollectionFindAndRerankOptions]

CollectionFindAndRerankOption configures a CollectionFindAndRerank operation. You can use the fluent-style builder or a pointer to CollectionFindAndRerankOptions interchangeably.

Example using the fluent builder (CollectionFindAndRerank):

// No need to use pointer for builder; the builder handles that for you.
opts := options.CollectionFindAndRerank().SetLimit(42)

Example using a pointer to CollectionFindAndRerankOptions without the fluent builder:

opts := &options.CollectionFindAndRerankOptions{Limit: ptr.To(42)}

type CollectionFindAndRerankOptions

type CollectionFindAndRerankOptions struct {
	// Sort specifies how to sort the results. For findAndRerank, this is typically a hybrid sort.
	Sort sort.Sortable `json:"sort,omitempty"`

	// Projection controls which fields are included or excluded in the returned documents.
	Projection map[string]any `json:"projection,omitempty"`

	// Limit limits the total number of documents returned.
	Limit *int `json:"limit,omitempty"`

	// HybridLimits provides additional limits for hybrid search.
	// This can be a single number (for both vector and lexical) or a map[string]int.
	HybridLimits any `json:"hybridLimits,omitempty"`

	// IncludeScores if true, includes a $scores property in the response.
	IncludeScores *bool `json:"includeScores,omitempty"`

	// IncludeSortVector if true, includes the sort vector in the response.
	IncludeSortVector *bool `json:"includeSortVector,omitempty"`

	// RerankOn specifies the field to rerank on.
	RerankOn *string `json:"rerankOn,omitempty"`

	// RerankQuery provides the query to use for reranking.
	RerankQuery *string `json:"rerankQuery,omitempty"`

	// InitialPageState is used for pagination (if supported by the API in the future).
	InitialPageState *string `json:"pageState,omitempty"`

	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command.
	APIOptions *APIOptions `json:"-"`
}

CollectionFindAndRerankOptions represents options for finding and reranking documents in a collection.

func (*CollectionFindAndRerankOptions) Children
func (o *CollectionFindAndRerankOptions) Children() []any

Children implements ChildValidator for CollectionFindAndRerankOptions. Returns all non-nil option fields.

func (*CollectionFindAndRerankOptions) Setters
func (o *CollectionFindAndRerankOptions) Setters() []func(*CollectionFindAndRerankOptions)

Setters implements Builder[CollectionFindAndRerankOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CollectionFindAndRerankOptions].

func (*CollectionFindAndRerankOptions) Validate
func (o *CollectionFindAndRerankOptions) Validate() error

Validate implements Validator for CollectionFindAndRerankOptions. If HybridLimits is set, it must be either an int or a map[string]int.

type CollectionFindOneAndDeleteOption

type CollectionFindOneAndDeleteOption = Builder[CollectionFindOneAndDeleteOptions]

CollectionFindOneAndDeleteOption configures a CollectionFindOneAndDelete operation. You can use the fluent-style builder or a pointer to CollectionFindOneAndDeleteOptions interchangeably.

Example using the fluent builder (CollectionFindOneAndDelete):

opts := options.CollectionFindOneAndDelete().SetSort(...)

Example using a pointer to CollectionFindOneAndDeleteOptions without the fluent builder:

opts := &options.CollectionFindOneAndDeleteOptions{...}

type CollectionFindOneAndDeleteOptions

type CollectionFindOneAndDeleteOptions struct {
	// Sort specifies the sort order to apply before selecting the document to delete.
	Sort sort.Sortable `json:"sort,omitempty"`
	// Projection controls which fields are included or excluded in the returned document.
	Projection map[string]any `json:"projection,omitempty"`
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Collection→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

CollectionFindOneAndDeleteOptions represents options for a findOneAndDelete operation.

func (*CollectionFindOneAndDeleteOptions) Children
func (o *CollectionFindOneAndDeleteOptions) Children() []any

Children implements ChildValidator for CollectionFindOneAndDeleteOptions. Returns all non-nil option fields.

func (*CollectionFindOneAndDeleteOptions) Setters
func (o *CollectionFindOneAndDeleteOptions) Setters() []func(*CollectionFindOneAndDeleteOptions)

Setters implements Builder[CollectionFindOneAndDeleteOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CollectionFindOneAndDeleteOptions].

type CollectionFindOneAndReplaceOption

type CollectionFindOneAndReplaceOption = Builder[CollectionFindOneAndReplaceOptions]

CollectionFindOneAndReplaceOption configures a CollectionFindOneAndReplace operation. You can use the fluent-style builder or a pointer to CollectionFindOneAndReplaceOptions interchangeably.

Example using the fluent builder (CollectionFindOneAndReplace):

// No need to use pointer for builder; the builder handles that for you.
opts := options.CollectionFindOneAndReplace().SetUpsert(false)

Example using a pointer to CollectionFindOneAndReplaceOptions without the fluent builder:

opts := &options.CollectionFindOneAndReplaceOptions{Upsert: ptr.To(false)}

type CollectionFindOneAndReplaceOptions

type CollectionFindOneAndReplaceOptions struct {
	// Sort specifies the sort order to apply before selecting the document to replace.
	Sort sort.Sortable `json:"sort,omitempty"`
	// Projection controls which fields are included or excluded in the returned document.
	Projection map[string]any `json:"projection,omitempty"`
	// Upsert if true, inserts a new document if no document matches the filter.
	Upsert *bool `json:"upsert,omitempty"`
	// ReturnDocument specifies whether to return the document before or after the replacement.
	ReturnDocument *ReturnDocument `json:"returnDocument,omitempty"`
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Collection→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

CollectionFindOneAndReplaceOptions represents options for a findOneAndReplace operation.

func (*CollectionFindOneAndReplaceOptions) Children
func (o *CollectionFindOneAndReplaceOptions) Children() []any

Children implements ChildValidator for CollectionFindOneAndReplaceOptions. Returns all non-nil option fields.

func (*CollectionFindOneAndReplaceOptions) Setters
func (o *CollectionFindOneAndReplaceOptions) Setters() []func(*CollectionFindOneAndReplaceOptions)

Setters implements Builder[CollectionFindOneAndReplaceOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CollectionFindOneAndReplaceOptions].

type CollectionFindOneAndUpdateOption

type CollectionFindOneAndUpdateOption = Builder[CollectionFindOneAndUpdateOptions]

CollectionFindOneAndUpdateOption configures a CollectionFindOneAndUpdate operation. You can use the fluent-style builder or a pointer to CollectionFindOneAndUpdateOptions interchangeably.

Example using the fluent builder (CollectionFindOneAndUpdate):

// No need to use pointer for builder; the builder handles that for you.
opts := options.CollectionFindOneAndUpdate().SetUpsert(false)

Example using a pointer to CollectionFindOneAndUpdateOptions without the fluent builder:

opts := &options.CollectionFindOneAndUpdateOptions{Upsert: ptr.To(false)}

type CollectionFindOneAndUpdateOptions

type CollectionFindOneAndUpdateOptions struct {
	// Sort specifies the sort order to apply before selecting the document to update.
	Sort sort.Sortable `json:"sort,omitempty"`
	// Projection controls which fields are included or excluded in the returned document.
	Projection map[string]any `json:"projection,omitempty"`
	// Upsert if true, inserts a new document if no document matches the filter.
	Upsert *bool `json:"upsert,omitempty"`
	// ReturnDocument specifies whether to return the document before or after the update.
	ReturnDocument *ReturnDocument `json:"returnDocument,omitempty"`
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Collection→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

CollectionFindOneAndUpdateOptions represents options for a findOneAndUpdate operation.

func (*CollectionFindOneAndUpdateOptions) Children
func (o *CollectionFindOneAndUpdateOptions) Children() []any

Children implements ChildValidator for CollectionFindOneAndUpdateOptions. Returns all non-nil option fields.

func (*CollectionFindOneAndUpdateOptions) Setters
func (o *CollectionFindOneAndUpdateOptions) Setters() []func(*CollectionFindOneAndUpdateOptions)

Setters implements Builder[CollectionFindOneAndUpdateOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CollectionFindOneAndUpdateOptions].

type CollectionFindOneOption

type CollectionFindOneOption = Builder[CollectionFindOneOptions]

CollectionFindOneOption configures a CollectionFindOne operation. You can use the fluent-style builder or a pointer to CollectionFindOneOptions interchangeably.

Example using the fluent builder (CollectionFindOne):

// No need to use pointer for builder; the builder handles that for you.
opts := options.CollectionFindOne().SetIncludeSimilarity(false)

Example using a pointer to CollectionFindOneOptions without the fluent builder:

opts := &options.CollectionFindOneOptions{IncludeSimilarity: ptr.To(false)}

type CollectionFindOneOptions

type CollectionFindOneOptions struct {
	// Sort specifies the sort order to apply before selecting the document to update.
	Sort sort.Sortable `json:"sort,omitempty"`
	// Projection controls which fields are included or excluded in the returned document.
	Projection map[string]any `json:"projection,omitempty"`
	// IncludeSimilarity if true, include the similarity score in the result via the
	// $similarity field.
	IncludeSimilarity *bool `json:"includeSimilarity,omitempty"`
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Collection→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

CollectionFindOneOptions represents options for a findOne operation.

func (*CollectionFindOneOptions) Children
func (o *CollectionFindOneOptions) Children() []any

Children implements ChildValidator for CollectionFindOneOptions. Returns all non-nil option fields.

func (*CollectionFindOneOptions) Setters
func (o *CollectionFindOneOptions) Setters() []func(*CollectionFindOneOptions)

Setters implements Builder[CollectionFindOneOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CollectionFindOneOptions].

type CollectionFindOption

type CollectionFindOption = Builder[CollectionFindOptions]

CollectionFindOption configures a CollectionFind operation. You can use the fluent-style builder or a pointer to CollectionFindOptions interchangeably.

Example using the fluent builder (CollectionFind):

// No need to use pointer for builder; the builder handles that for you.
opts := options.CollectionFind().SetLimit(42)

Example using a pointer to CollectionFindOptions without the fluent builder:

opts := &options.CollectionFindOptions{Limit: ptr.To(42)}

type CollectionFindOptions

type CollectionFindOptions struct {
	// Sort specifies how to sort the results. Can be used for:
	//  - Ascending/descending sort on fields: sort.Asc("rating").Desc("title")
	//  - Vector search with a vector: sort.Vector([]float32{0.1, 0.2, 0.3})
	//  - Vector search with vectorize: sort.Vectorize("search text")
	Sort sort.Sortable `json:"sort,omitempty"`

	// Projection controls which fields are included or excluded in the returned documents
	// Use true to include a field, false to exclude it
	Projection map[string]any `json:"projection,omitempty"`

	// Limit limits the total number of documents returned
	Limit *int `json:"limit,omitempty"`

	// Skip specifies the number of documents to bypass before returning results.
	// Only valid with ascending/descending sort, not with vector search.
	Skip *int `json:"skip,omitempty"`

	// IncludeSimilarity if true, includes a $similarity property in the response
	// for vector searches.
	IncludeSimilarity *bool `json:"includeSimilarity,omitempty"`

	// IncludeSortVector if true, includes the sort vector in the response.
	// Useful for vector searches using $vectorize.
	IncludeSortVector *bool `json:"includeSortVector,omitempty"`

	// InitialPageState is used for pagination to fetch the next page of results
	InitialPageState *string `json:"pageState,omitempty"`

	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Collection→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

CollectionFindOptions represents options for finding documents in a collection

func (*CollectionFindOptions) Children
func (o *CollectionFindOptions) Children() []any

Children implements ChildValidator for CollectionFindOptions. Returns all non-nil option fields.

func (*CollectionFindOptions) Setters
func (o *CollectionFindOptions) Setters() []func(*CollectionFindOptions)

Setters implements Builder[CollectionFindOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CollectionFindOptions].

type CollectionInsertManyOption

type CollectionInsertManyOption = Builder[CollectionInsertManyOptions]

CollectionInsertManyOption configures a CollectionInsertMany operation. You can use the fluent-style builder or a pointer to CollectionInsertManyOptions interchangeably.

Example using the fluent builder (CollectionInsertMany):

// No need to use pointer for builder; the builder handles that for you.
opts := options.CollectionInsertMany().SetOrdered(false)

Example using a pointer to CollectionInsertManyOptions without the fluent builder:

opts := &options.CollectionInsertManyOptions{Ordered: ptr.To(false)}

type CollectionInsertManyOptions

type CollectionInsertManyOptions struct {
	Ordered     *bool       `json:"ordered,omitempty"`
	ChunkSize   *int        `json:"-"`
	Concurrency *int        `json:"-"`
	APIOptions  *APIOptions `json:"-"`
}
func (*CollectionInsertManyOptions) Children
func (o *CollectionInsertManyOptions) Children() []any

Children implements ChildValidator for CollectionInsertManyOptions. Returns all non-nil option fields.

func (*CollectionInsertManyOptions) Setters
func (o *CollectionInsertManyOptions) Setters() []func(*CollectionInsertManyOptions)

Setters implements Builder[CollectionInsertManyOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CollectionInsertManyOptions].

func (*CollectionInsertManyOptions) Validate
func (o *CollectionInsertManyOptions) Validate() error

type CollectionInsertOneOption

type CollectionInsertOneOption = Builder[CollectionInsertOneOptions]

CollectionInsertOneOption configures a CollectionInsertOne operation. You can use the fluent-style builder or a pointer to CollectionInsertOneOptions interchangeably.

Example using the fluent builder (CollectionInsertOne):

opts := options.CollectionInsertOne().SetAPIOptions(...)

Example using a pointer to CollectionInsertOneOptions without the fluent builder:

opts := &options.CollectionInsertOneOptions{...}

type CollectionInsertOneOptions

type CollectionInsertOneOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Collection→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

CollectionInsertOneOptions represents options for inserting a single document. Right now this is empty except for APIOptions, but leaving it here for future-proofing.

func (*CollectionInsertOneOptions) Children
func (o *CollectionInsertOneOptions) Children() []any

Children implements ChildValidator for CollectionInsertOneOptions. Returns all non-nil option fields.

func (*CollectionInsertOneOptions) Setters
func (o *CollectionInsertOneOptions) Setters() []func(*CollectionInsertOneOptions)

Setters implements Builder[CollectionInsertOneOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CollectionInsertOneOptions].

type CollectionOptionsOption

type CollectionOptionsOption = Builder[CollectionOptionsOptions]

CollectionOptionsOption configures a CollectionOptions operation. You can use the fluent-style builder or a pointer to CollectionOptionsOptions interchangeably.

Example using the fluent builder (CollectionOptions):

opts := options.CollectionOptions().SetAPIOptions(...)

Example using a pointer to CollectionOptionsOptions without the fluent builder:

opts := &options.CollectionOptionsOptions{...}

type CollectionOptionsOptions

type CollectionOptionsOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Collection→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

CollectionOptionsOptions represents options for fetching a collection's descriptor. Right now this is empty except for APIOptions, but leaving it here for future-proofing.

func (*CollectionOptionsOptions) Children
func (o *CollectionOptionsOptions) Children() []any

Children implements ChildValidator for CollectionOptionsOptions. Returns all non-nil option fields.

func (*CollectionOptionsOptions) Setters
func (o *CollectionOptionsOptions) Setters() []func(*CollectionOptionsOptions)

Setters implements Builder[CollectionOptionsOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CollectionOptionsOptions].

type CollectionReplaceOneOption

type CollectionReplaceOneOption = Builder[CollectionReplaceOneOptions]

CollectionReplaceOneOption configures a CollectionReplaceOne operation. You can use the fluent-style builder or a pointer to CollectionReplaceOneOptions interchangeably.

Example using the fluent builder (CollectionReplaceOne):

// No need to use pointer for builder; the builder handles that for you.
opts := options.CollectionReplaceOne().SetUpsert(false)

Example using a pointer to CollectionReplaceOneOptions without the fluent builder:

opts := &options.CollectionReplaceOneOptions{Upsert: ptr.To(false)}

type CollectionReplaceOneOptions

type CollectionReplaceOneOptions struct {
	// Sort specifies the sort order to apply before selecting the document to replace.
	Sort sort.Sortable `json:"sort,omitempty"`
	// Upsert if true, inserts a new document if no document matches the filter.
	Upsert *bool `json:"upsert,omitempty"`
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Collection→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

CollectionReplaceOneOptions represents options for a replaceOne operation.

func (*CollectionReplaceOneOptions) Children
func (o *CollectionReplaceOneOptions) Children() []any

Children implements ChildValidator for CollectionReplaceOneOptions. Returns all non-nil option fields.

func (*CollectionReplaceOneOptions) Setters
func (o *CollectionReplaceOneOptions) Setters() []func(*CollectionReplaceOneOptions)

Setters implements Builder[CollectionReplaceOneOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CollectionReplaceOneOptions].

type CollectionUpdateManyOption

type CollectionUpdateManyOption = Builder[CollectionUpdateManyOptions]

CollectionUpdateManyOption configures a CollectionUpdateMany operation. You can use the fluent-style builder or a pointer to CollectionUpdateManyOptions interchangeably.

Example using the fluent builder (CollectionUpdateMany):

// No need to use pointer for builder; the builder handles that for you.
opts := options.CollectionUpdateMany().SetUpsert(false)

Example using a pointer to CollectionUpdateManyOptions without the fluent builder:

opts := &options.CollectionUpdateManyOptions{Upsert: ptr.To(false)}

type CollectionUpdateManyOptions

type CollectionUpdateManyOptions struct {
	// Upsert if true, inserts a new document if no document matches the filter.
	Upsert *bool `json:"upsert,omitempty"`
	// Timeout is the overall timeout for the entire paginated operation.
	// Overrides the GeneralMethod timeout from the hierarchy. Client-side only.
	Timeout *time.Duration `json:"-"`
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Collection→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

CollectionUpdateManyOptions represents options for an updateMany operation.

func (*CollectionUpdateManyOptions) Children
func (o *CollectionUpdateManyOptions) Children() []any

Children implements ChildValidator for CollectionUpdateManyOptions. Returns all non-nil option fields.

func (*CollectionUpdateManyOptions) Setters
func (o *CollectionUpdateManyOptions) Setters() []func(*CollectionUpdateManyOptions)

Setters implements Builder[CollectionUpdateManyOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CollectionUpdateManyOptions].

type CollectionUpdateOneOption

type CollectionUpdateOneOption = Builder[CollectionUpdateOneOptions]

CollectionUpdateOneOption configures a CollectionUpdateOne operation. You can use the fluent-style builder or a pointer to CollectionUpdateOneOptions interchangeably.

Example using the fluent builder (CollectionUpdateOne):

// No need to use pointer for builder; the builder handles that for you.
opts := options.CollectionUpdateOne().SetUpsert(false)

Example using a pointer to CollectionUpdateOneOptions without the fluent builder:

opts := &options.CollectionUpdateOneOptions{Upsert: ptr.To(false)}

type CollectionUpdateOneOptions

type CollectionUpdateOneOptions struct {
	// Sort specifies the sort order to apply before selecting the document to update.
	// This determines which document is updated when the filter matches multiple documents.
	Sort sort.Sortable `json:"sort,omitempty"`
	// Upsert if true, inserts a new document if no document matches the filter.
	Upsert *bool `json:"upsert,omitempty"`
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Collection→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

CollectionUpdateOneOptions represents options for an updateOne operation.

func (*CollectionUpdateOneOptions) Children
func (o *CollectionUpdateOneOptions) Children() []any

Children implements ChildValidator for CollectionUpdateOneOptions. Returns all non-nil option fields.

func (*CollectionUpdateOneOptions) Setters
func (o *CollectionUpdateOneOptions) Setters() []func(*CollectionUpdateOneOptions)

Setters implements Builder[CollectionUpdateOneOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CollectionUpdateOneOptions].

type CreateCollectionOption

type CreateCollectionOption = Builder[CreateCollectionOptions]

CreateCollectionOption configures a CreateCollection operation. You can use the fluent-style builder or a pointer to CreateCollectionOptions interchangeably.

Example using the fluent builder (CreateCollection):

// No need to use pointer for builder; the builder handles that for you.
opts := options.CreateCollection().SetKeyspace("value")

Example using a pointer to CreateCollectionOptions without the fluent builder:

opts := &options.CreateCollectionOptions{Keyspace: ptr.To("value")}

type CreateCollectionOptions

type CreateCollectionOptions struct {
	// Settings for generating ids
	DefaultId *CollectionDefaultIdOptions `json:"defaultId,omitempty"`

	// Vector specifications for the collection
	Vector *VectorOptions `json:"vector,omitempty"`

	// Overrides for document indexing
	Indexing *IndexingOptions `json:"indexing,omitempty"`

	// Lexical analysis options for the collection
	Lexical *LexicalOptions `json:"lexical,omitempty"`

	// Reranking options for the collection
	Rerank *RerankOptions `json:"rerank,omitempty"`

	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Collection→Command hierarchy.
	APIOptions *APIOptions `json:"-" optlift:"Keyspace,EmbeddingHeadersProvider,RerankingHeadersProvider"`
}

CreateCollectionOptions represents options for a collection's behavior.

func (*CreateCollectionOptions) Children
func (o *CreateCollectionOptions) Children() []any

Children implements ChildValidator for CreateCollectionOptions. Returns all non-nil option fields.

func (*CreateCollectionOptions) Setters
func (o *CreateCollectionOptions) Setters() []func(*CreateCollectionOptions)

Setters implements Builder[CreateCollectionOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CreateCollectionOptions].

type CreateDatabaseOption

type CreateDatabaseOption = Builder[CreateDatabaseOptions]

CreateDatabaseOption configures a CreateDatabase operation. You can use the fluent-style builder or a pointer to CreateDatabaseOptions interchangeably.

Example using the fluent builder (CreateDatabase):

// No need to use pointer for builder; the builder handles that for you.
opts := options.CreateDatabase().SetKeyspace("value")

Example using a pointer to CreateDatabaseOptions without the fluent builder:

opts := &options.CreateDatabaseOptions{Keyspace: ptr.To("value")}

type CreateDatabaseOptions

type CreateDatabaseOptions struct {
	// Keyspace is the initial keyspace name. Defaults to "default_keyspace" if not specified.
	Keyspace *string
	// Blocking controls whether to wait for the database to become ACTIVE.
	// Defaults to true.
	Blocking *bool
	// PollInterval is how often to check the database status when blocking.
	// Defaults to DefaultDatabasePollInterval (10 seconds).
	PollInterval *time.Duration

	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→Admin hierarchy.
	APIOptions *APIOptions
}

CreateDatabaseOptions represents options for the CreateDatabase operation.

func (*CreateDatabaseOptions) Children
func (o *CreateDatabaseOptions) Children() []any

Children implements ChildValidator for CreateDatabaseOptions. Returns all non-nil option fields.

func (*CreateDatabaseOptions) GetBlocking
func (o *CreateDatabaseOptions) GetBlocking() bool

GetBlocking returns the Blocking option or true if not set.

func (*CreateDatabaseOptions) GetPollInterval
func (o *CreateDatabaseOptions) GetPollInterval() time.Duration

GetPollInterval returns the PollInterval option or DefaultDatabasePollInterval if not set.

func (*CreateDatabaseOptions) Setters
func (o *CreateDatabaseOptions) Setters() []func(*CreateDatabaseOptions)

Setters implements Builder[CreateDatabaseOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CreateDatabaseOptions].

type CreateIndexOption

type CreateIndexOption = Builder[CreateIndexOptions]

CreateIndexOption configures a CreateIndex operation. You can use the fluent-style builder or a pointer to CreateIndexOptions interchangeably.

Example using the fluent builder (CreateIndex):

// No need to use pointer for builder; the builder handles that for you.
opts := options.CreateIndex().SetIfNotExists(false)

Example using a pointer to CreateIndexOptions without the fluent builder:

opts := &options.CreateIndexOptions{IfNotExists: ptr.To(false)}

type CreateIndexOptions

type CreateIndexOptions struct {
	// IfNotExists if true, the command will silently succeed even if an index
	// with the given name already exists. This only checks index names, not definitions.
	IfNotExists *bool

	// Ascii if true, converts non-ASCII characters to US-ASCII before indexing.
	// Only applicable to text columns.
	Ascii *bool

	// Normalize if true, applies Unicode character normalization before indexing.
	// Only applicable to text columns.
	Normalize *bool

	// CaseSensitive if true (default), enforces case-sensitive matching.
	// Only applicable to text columns.
	CaseSensitive *bool

	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Table→Command hierarchy.
	APIOptions *APIOptions
}

CreateIndexOptions represents options for creating a regular index.

func (*CreateIndexOptions) Children
func (o *CreateIndexOptions) Children() []any

Children implements ChildValidator for CreateIndexOptions. Returns all non-nil option fields.

func (*CreateIndexOptions) Setters
func (o *CreateIndexOptions) Setters() []func(*CreateIndexOptions)

Setters implements Builder[CreateIndexOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CreateIndexOptions].

type CreateKeyspaceOption

type CreateKeyspaceOption = Builder[CreateKeyspaceOptions]

CreateKeyspaceOption configures a CreateKeyspace operation. You can use the fluent-style builder or a pointer to CreateKeyspaceOptions interchangeably.

Example using the fluent builder (CreateKeyspace):

// No need to use pointer for builder; the builder handles that for you.
opts := options.CreateKeyspace().SetBlocking(false)

Example using a pointer to CreateKeyspaceOptions without the fluent builder:

opts := &options.CreateKeyspaceOptions{Blocking: ptr.To(false)}

type CreateKeyspaceOptions

type CreateKeyspaceOptions struct {
	// Blocking controls whether to wait for the keyspace to become visible.
	// Defaults to true. Only used by the Astra (DevOps API) path.
	Blocking *bool
	// PollInterval is how often to check whether the keyspace exists when blocking.
	// Defaults to DefaultKeyspacePollInterval (1 second). Only used by the Astra (DevOps API) path.
	PollInterval *time.Duration
	// ReplicationFactor sets the replication factor for the keyspace.
	// Only used by the Data API path (non-Astra environments).
	ReplicationFactor *int
	// UpdateDbKeyspace controls whether to update the parent Db instance to use the
	// new keyspace after creation. Defaults to false.
	UpdateDbKeyspace *bool
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Table→Command hierarchy.
	APIOptions *APIOptions
}

CreateKeyspaceOptions represents options for the CreateKeyspace operation.

func (*CreateKeyspaceOptions) Children
func (o *CreateKeyspaceOptions) Children() []any

Children implements ChildValidator for CreateKeyspaceOptions. Returns all non-nil option fields.

func (*CreateKeyspaceOptions) GetBlocking
func (o *CreateKeyspaceOptions) GetBlocking() bool

GetBlocking returns the Blocking option or true if not set.

func (*CreateKeyspaceOptions) GetPollInterval
func (o *CreateKeyspaceOptions) GetPollInterval() time.Duration

GetPollInterval returns the PollInterval option or DefaultKeyspacePollInterval if not set.

func (*CreateKeyspaceOptions) Setters
func (o *CreateKeyspaceOptions) Setters() []func(*CreateKeyspaceOptions)

Setters implements Builder[CreateKeyspaceOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CreateKeyspaceOptions].

type CreateTableOption

type CreateTableOption = Builder[CreateTableOptions]

CreateTableOption configures a CreateTable operation. You can use the fluent-style builder or a pointer to CreateTableOptions interchangeably.

Example using the fluent builder (CreateTable):

// No need to use pointer for builder; the builder handles that for you.
opts := options.CreateTable().SetIfNotExists(false)

Example using a pointer to CreateTableOptions without the fluent builder:

opts := &options.CreateTableOptions{IfNotExists: ptr.To(false)}

type CreateTableOptions

type CreateTableOptions struct {
	// IfNotExists if true, the command will silently succeed even if a table
	// with the given name already exists. This only checks table names, not schemas.
	IfNotExists *bool `json:"ifNotExists,omitempty"`

	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Table→Command hierarchy.
	APIOptions *APIOptions `json:"-" optlift:"Keyspace,EmbeddingHeadersProvider,RerankingHeadersProvider"`
}

CreateTableOptions represents options for creating a table

func (*CreateTableOptions) Children
func (o *CreateTableOptions) Children() []any

Children implements ChildValidator for CreateTableOptions. Returns all non-nil option fields.

func (*CreateTableOptions) Setters
func (o *CreateTableOptions) Setters() []func(*CreateTableOptions)

Setters implements Builder[CreateTableOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CreateTableOptions].

type CreateTextIndexOption

type CreateTextIndexOption = Builder[CreateTextIndexOptions]

CreateTextIndexOption configures a CreateTextIndex operation. You can use the fluent-style builder or a pointer to CreateTextIndexOptions interchangeably.

Example using the fluent builder (CreateTextIndex):

// No need to use pointer for builder; the builder handles that for you.
opts := options.CreateTextIndex().SetIfNotExists(false)

Example using a pointer to CreateTextIndexOptions without the fluent builder:

opts := &options.CreateTextIndexOptions{IfNotExists: ptr.To(false)}

type CreateTextIndexOptions

type CreateTextIndexOptions struct {
	// IfNotExists if true, the command will silently succeed even if an index
	// with the given name already exists. This only checks index names, not definitions.
	IfNotExists *bool

	// Analyzer is the name of the analyzer to use for the index, or a configuration map.
	Analyzer any

	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Table→Command hierarchy.
	APIOptions *APIOptions
}

CreateTextIndexOptions represents options for creating a text index.

func (*CreateTextIndexOptions) Children
func (o *CreateTextIndexOptions) Children() []any

Children implements ChildValidator for CreateTextIndexOptions. Returns all non-nil option fields.

func (*CreateTextIndexOptions) Setters
func (o *CreateTextIndexOptions) Setters() []func(*CreateTextIndexOptions)

Setters implements Builder[CreateTextIndexOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CreateTextIndexOptions].

type CreateTypeOption

type CreateTypeOption = Builder[CreateTypeOptions]

CreateTypeOption configures a CreateType operation. You can use the fluent-style builder or a pointer to CreateTypeOptions interchangeably.

Example using the fluent builder (CreateType):

// No need to use pointer for builder; the builder handles that for you.
opts := options.CreateType().SetIfNotExists(false)

Example using a pointer to CreateTypeOptions without the fluent builder:

opts := &options.CreateTypeOptions{IfNotExists: ptr.To(false)}

type CreateTypeOptions

type CreateTypeOptions struct {
	// IfNotExists if true, the command will silently succeed even if a type
	// with the given name already exists. This only checks type names, not schemas.
	IfNotExists *bool `json:"ifNotExists,omitempty"`

	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Command hierarchy.
	APIOptions *APIOptions `json:"-" optlift:"Keyspace"`
}

CreateTypeOptions represents options for creating a user-defined type.

func (*CreateTypeOptions) Children
func (o *CreateTypeOptions) Children() []any

Children implements ChildValidator for CreateTypeOptions. Returns all non-nil option fields.

func (*CreateTypeOptions) Setters
func (o *CreateTypeOptions) Setters() []func(*CreateTypeOptions)

Setters implements Builder[CreateTypeOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CreateTypeOptions].

type CreateVectorIndexOption

type CreateVectorIndexOption = Builder[CreateVectorIndexOptions]

CreateVectorIndexOption configures a CreateVectorIndex operation. You can use the fluent-style builder or a pointer to CreateVectorIndexOptions interchangeably.

Example using the fluent builder (CreateVectorIndex):

// No need to use pointer for builder; the builder handles that for you.
opts := options.CreateVectorIndex().SetIfNotExists(false)

Example using a pointer to CreateVectorIndexOptions without the fluent builder:

opts := &options.CreateVectorIndexOptions{IfNotExists: ptr.To(false)}

type CreateVectorIndexOptions

type CreateVectorIndexOptions struct {
	// IfNotExists if true, the command will silently succeed even if an index
	// with the given name already exists. This only checks index names, not definitions.
	IfNotExists *bool

	// Metric is the similarity measurement for vector search.
	// Valid values: "cosine" (default), "dot_product", "euclidean"
	Metric *VectorMetric

	// SourceModel is the embedding generation model, enabling optimizations.
	// Valid values: "ada002", "bert", "cohere-v3", "gecko", "nv-qa-4",
	// "openai-v3-large", "openai-v3-small", "other" (default)
	//
	// NOTE: following the other libraries' patterns, we are using a enum-like option for Metric, but
	// this is a string. For reference:
	// https://docs.datastax.com/en/astra-db-serverless/api-reference/table-index-methods/create-vector-index.html#parameters
	SourceModel *string

	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Table→Command hierarchy.
	APIOptions *APIOptions
}

CreateVectorIndexOptions represents options for creating a vector index.

func (*CreateVectorIndexOptions) Children
func (o *CreateVectorIndexOptions) Children() []any

Children implements ChildValidator for CreateVectorIndexOptions. Returns all non-nil option fields.

func (*CreateVectorIndexOptions) Setters
func (o *CreateVectorIndexOptions) Setters() []func(*CreateVectorIndexOptions)

Setters implements Builder[CreateVectorIndexOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[CreateVectorIndexOptions].

type DataAPIBackend

type DataAPIBackend string

DataAPIBackend represents the database backend (controls Data API path).

const (
	// DataAPIBackendAstra is the Astra backend.
	DataAPIBackendAstra DataAPIBackend = "astra"
	// DataAPIBackendHCD is the Hyper-Converged Database backend.
	DataAPIBackendHCD DataAPIBackend = "hcd"
	// DataAPIBackendDSE is the DataStax Enterprise backend.
	DataAPIBackendDSE DataAPIBackend = "dse"
	// DataAPIBackendCassandra is the open-source Cassandra backend.
	DataAPIBackendCassandra DataAPIBackend = "cassandra"
	// DataAPIBackendOther is any other backend.
	DataAPIBackendOther DataAPIBackend = "other"
)
func (DataAPIBackend) DataAPIPath
func (b DataAPIBackend) DataAPIPath() string

DataAPIPath returns the Data API URL path prefix for this backend. Astra uses "api/json", while other backends have no prefix (the version is appended separately by the command layer).

So, for astra, the URL will be something like: https://{database-id}-{region}.apps.astra.datastax.com/api/json/{version}/

Non-astra DBs don't have /api/json. See also: https://github.com/datastax/astra-db-ts/blob/45f1c7fd9d46d82eee802947a285437c70d419bf/src/lib/api/constants.ts#L62

func (DataAPIBackend) IsAstra
func (b DataAPIBackend) IsAstra() bool

IsAstra returns true if the backend is Astra.

type DatabaseInfoOption

type DatabaseInfoOption = Builder[DatabaseInfoOptions]

DatabaseInfoOption configures a DatabaseInfo operation. You can use the fluent-style builder or a pointer to DatabaseInfoOptions interchangeably.

Example using the fluent builder (DatabaseInfo):

opts := options.DatabaseInfo().SetAPIOptions(...)

Example using a pointer to DatabaseInfoOptions without the fluent builder:

opts := &options.DatabaseInfoOptions{...}

type DatabaseInfoOptions

type DatabaseInfoOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→Admin hierarchy.
	APIOptions *APIOptions
}

DatabaseInfoOptions represents options for the DatabaseInfo (AstraAdmin) and Info (Db/AstraDatabaseAdmin) operations.

func (*DatabaseInfoOptions) Children
func (o *DatabaseInfoOptions) Children() []any

Children implements ChildValidator for DatabaseInfoOptions. Returns all non-nil option fields.

func (*DatabaseInfoOptions) Setters
func (o *DatabaseInfoOptions) Setters() []func(*DatabaseInfoOptions)

Setters implements Builder[DatabaseInfoOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[DatabaseInfoOptions].

type DatabaseStatus

type DatabaseStatus string

DatabaseStatus represents the status of an Astra database. Also used as a filter value for ListDatabases (e.g., DatabaseStatusAll, DatabaseStatusNonTerminated).

const (
	// DatabaseStatusActive indicates the database is ready for use.
	DatabaseStatusActive DatabaseStatus = "ACTIVE"
	// DatabaseStatusAssociating indicates the database is being associated to a [PCU] group.
	//
	// [PCU]: https://docs.datastax.com/en/astra-db-serverless/administration/provisioned-capacity-units.html
	DatabaseStatusAssociating DatabaseStatus = "ASSOCIATING"
	// DatabaseStatusPending indicates the database creation is pending.
	DatabaseStatusPending DatabaseStatus = "PENDING"
	// DatabaseStatusInitializing indicates the database is being initialized.
	DatabaseStatusInitializing DatabaseStatus = "INITIALIZING"
	// DatabaseStatusTerminating indicates the database is being terminated.
	DatabaseStatusTerminating DatabaseStatus = "TERMINATING"
	// DatabaseStatusTerminated indicates the database has been terminated.
	DatabaseStatusTerminated DatabaseStatus = "TERMINATED"
	// DatabaseStatusMaintenance indicates the database is under maintenance.
	DatabaseStatusMaintenance DatabaseStatus = "MAINTENANCE"
	// DatabaseStatusError indicates the database is in an error state.
	DatabaseStatusError DatabaseStatus = "ERROR"
	// DatabaseStatusParking indicates the database is being parked (hibernated).
	DatabaseStatusParking DatabaseStatus = "PARKING"
	// DatabaseStatusParked indicates the database is parked (hibernated).
	DatabaseStatusParked DatabaseStatus = "PARKED"
	// DatabaseStatusUnparking indicates the database is being unparked.
	DatabaseStatusUnparking DatabaseStatus = "UNPARKING"
	// DatabaseStatusPreparing indicates the database is preparing.
	DatabaseStatusPreparing DatabaseStatus = "PREPARING"
	// DatabaseStatusPrepared indicates the database is prepared.
	DatabaseStatusPrepared DatabaseStatus = "PREPARED"
	// DatabaseStatusResizing indicates the database is being resized.
	DatabaseStatusResizing DatabaseStatus = "RESIZING"
	// DatabaseStatusSuspended indicates the database is suspended.
	DatabaseStatusSuspended DatabaseStatus = "SUSPENDED"
	// DatabaseStatusSuspending indicates the database is being suspended.
	DatabaseStatusSuspending DatabaseStatus = "SUSPENDING"

	// DatabaseStatusNonTerminated is a special filter value for ListDatabases
	// that returns all databases that are not terminated (default).
	DatabaseStatusNonTerminated DatabaseStatus = "NONTERMINATED"
	// DatabaseStatusAll is a special filter value for ListDatabases
	// that returns all databases regardless of status.
	DatabaseStatusAll DatabaseStatus = "ALL"
)

type DefaultIdType

type DefaultIdType string

DefaultIdType specifies the type of auto-generated document ID when no _id is provided in an inserted document. If not set, the default is a string UUID v4.

const (
	// DefaultIdTypeUUID uses a [UUID v4] as the default document ID.
	//
	// [UUID v4]: https://www.ietf.org/archive/id/draft-ietf-uuidrev-rfc4122bis-14.html#name-uuid-version-4
	DefaultIdTypeUUID DefaultIdType = DefaultIdType(constants.DefaultIdTypeUUID)
	// DefaultIdTypeUUIDv6 uses a UUID v6 as the default document ID.
	// UUID v6 is field-compatible with UUID v1 and supports lexicographic sorting.
	//
	// [UUID v6]: https://www.ietf.org/archive/id/draft-ietf-uuidrev-rfc4122bis-14.html#name-uuid-version-6
	DefaultIdTypeUUIDv6 DefaultIdType = DefaultIdType(constants.DefaultIdTypeUUIDv6)
	// DefaultIdTypeUUIDv7 uses a [UUID v7] as the default document ID.
	// UUID v7 is recommended for new systems as a replacement for UUID v1.
	//
	// [UUID v7]: https://www.ietf.org/archive/id/draft-ietf-uuidrev-rfc4122bis-14.html#name-uuid-version-7
	DefaultIdTypeUUIDv7 DefaultIdType = DefaultIdType(constants.DefaultIdTypeUUIDv7)
	// DefaultIdTypeObjectId uses an ObjectID as the default document ID.
	DefaultIdTypeObjectId DefaultIdType = DefaultIdType(constants.DefaultIdTypeObjectId)
)

type DropCollectionOption

type DropCollectionOption = Builder[DropCollectionOptions]

DropCollectionOption configures a DropCollection operation. You can use the fluent-style builder or a pointer to DropCollectionOptions interchangeably.

Example using the fluent builder (DropCollection):

// No need to use pointer for builder; the builder handles that for you.
opts := options.DropCollection().SetKeyspace("value")

Example using a pointer to DropCollectionOptions without the fluent builder:

opts := &options.DropCollectionOptions{Keyspace: ptr.To("value")}

type DropCollectionOptions

type DropCollectionOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Command hierarchy.
	APIOptions *APIOptions `optlift:"Keyspace"`
}

DropCollectionOptions represents options for dropping a collection. Right now this is empty except for APIOptions, but leaving it here for future-proofing.

func (*DropCollectionOptions) Children
func (o *DropCollectionOptions) Children() []any

Children implements ChildValidator for DropCollectionOptions. Returns all non-nil option fields.

func (*DropCollectionOptions) Setters
func (o *DropCollectionOptions) Setters() []func(*DropCollectionOptions)

Setters implements Builder[DropCollectionOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[DropCollectionOptions].

type DropDatabaseOption

type DropDatabaseOption = Builder[DropDatabaseOptions]

DropDatabaseOption configures a DropDatabase operation. You can use the fluent-style builder or a pointer to DropDatabaseOptions interchangeably.

Example using the fluent builder (DropDatabase):

// No need to use pointer for builder; the builder handles that for you.
opts := options.DropDatabase().SetBlocking(false)

Example using a pointer to DropDatabaseOptions without the fluent builder:

opts := &options.DropDatabaseOptions{Blocking: ptr.To(false)}

type DropDatabaseOptions

type DropDatabaseOptions struct {
	// Blocking controls whether to wait for the database to be fully terminated.
	// Defaults to true.
	Blocking *bool
	// PollInterval is how often to check the database status when blocking.
	// Defaults to DefaultDatabasePollInterval (10 seconds).
	PollInterval *time.Duration

	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→Admin hierarchy.
	APIOptions *APIOptions
}

DropDatabaseOptions represents options for the DropDatabase operation.

func (*DropDatabaseOptions) Children
func (o *DropDatabaseOptions) Children() []any

Children implements ChildValidator for DropDatabaseOptions. Returns all non-nil option fields.

func (*DropDatabaseOptions) GetBlocking
func (o *DropDatabaseOptions) GetBlocking() bool

GetBlocking returns the Blocking option or true if not set.

func (*DropDatabaseOptions) GetPollInterval
func (o *DropDatabaseOptions) GetPollInterval() time.Duration

GetPollInterval returns the PollInterval option or DefaultDatabasePollInterval if not set.

func (*DropDatabaseOptions) Setters
func (o *DropDatabaseOptions) Setters() []func(*DropDatabaseOptions)

Setters implements Builder[DropDatabaseOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[DropDatabaseOptions].

type DropKeyspaceOption

type DropKeyspaceOption = Builder[DropKeyspaceOptions]

DropKeyspaceOption configures a DropKeyspace operation. You can use the fluent-style builder or a pointer to DropKeyspaceOptions interchangeably.

Example using the fluent builder (DropKeyspace):

// No need to use pointer for builder; the builder handles that for you.
opts := options.DropKeyspace().SetBlocking(false)

Example using a pointer to DropKeyspaceOptions without the fluent builder:

opts := &options.DropKeyspaceOptions{Blocking: ptr.To(false)}

type DropKeyspaceOptions

type DropKeyspaceOptions struct {
	// Blocking controls whether to wait for the keyspace to be fully terminated.
	// Defaults to true.
	Blocking *bool
	// PollInterval is how often to check the keyspace status when blocking.
	// Defaults to DefaultKeyspacePollInterval (1 second).
	PollInterval *time.Duration
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Table→Command hierarchy.
	APIOptions *APIOptions
}

DropKeyspaceOptions represents options for the DropKeyspace operation.

func (*DropKeyspaceOptions) Children
func (o *DropKeyspaceOptions) Children() []any

Children implements ChildValidator for DropKeyspaceOptions. Returns all non-nil option fields.

func (*DropKeyspaceOptions) GetBlocking
func (o *DropKeyspaceOptions) GetBlocking() bool

GetBlocking returns the Blocking option or true if not set.

func (*DropKeyspaceOptions) GetPollInterval
func (o *DropKeyspaceOptions) GetPollInterval() time.Duration

GetPollInterval returns the PollInterval option or DefaultKeyspacePollInterval if not set.

func (*DropKeyspaceOptions) Setters
func (o *DropKeyspaceOptions) Setters() []func(*DropKeyspaceOptions)

Setters implements Builder[DropKeyspaceOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[DropKeyspaceOptions].

type DropTableIndexOption

type DropTableIndexOption = Builder[DropTableIndexOptions]

DropTableIndexOption configures a DropTableIndex operation. You can use the fluent-style builder or a pointer to DropTableIndexOptions interchangeably.

Example using the fluent builder (DropTableIndex):

// No need to use pointer for builder; the builder handles that for you.
opts := options.DropTableIndex().SetIfExists(false)

Example using a pointer to DropTableIndexOptions without the fluent builder:

opts := &options.DropTableIndexOptions{IfExists: ptr.To(false)}

type DropTableIndexOptions

type DropTableIndexOptions struct {
	// IfExists if true, the command will silently succeed even if an index
	// with the given name does not exist.
	IfExists *bool

	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Command hierarchy.
	APIOptions *APIOptions `optlift:"Keyspace"`
}

DropTableIndexOptions represents options for dropping a table index. Right now this is empty except for APIOptions, but leaving it here for future-proofing.

func (*DropTableIndexOptions) Children
func (o *DropTableIndexOptions) Children() []any

Children implements ChildValidator for DropTableIndexOptions. Returns all non-nil option fields.

func (*DropTableIndexOptions) Setters
func (o *DropTableIndexOptions) Setters() []func(*DropTableIndexOptions)

Setters implements Builder[DropTableIndexOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[DropTableIndexOptions].

type DropTableOption

type DropTableOption = Builder[DropTableOptions]

DropTableOption configures a DropTable operation. You can use the fluent-style builder or a pointer to DropTableOptions interchangeably.

Example using the fluent builder (DropTable):

// No need to use pointer for builder; the builder handles that for you.
opts := options.DropTable().SetIfExists(false)

Example using a pointer to DropTableOptions without the fluent builder:

opts := &options.DropTableOptions{IfExists: ptr.To(false)}

type DropTableOptions

type DropTableOptions struct {
	// IfExists if true, the command will silently succeed even if a table
	// with the given name does not exist.
	IfExists *bool

	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Command hierarchy.
	APIOptions *APIOptions `optlift:"Keyspace"`
}

DropTableOptions represents options for dropping a table. Right now this is empty except for APIOptions, but leaving it here for future-proofing.

func (*DropTableOptions) Children
func (o *DropTableOptions) Children() []any

Children implements ChildValidator for DropTableOptions. Returns all non-nil option fields.

func (*DropTableOptions) Setters
func (o *DropTableOptions) Setters() []func(*DropTableOptions)

Setters implements Builder[DropTableOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[DropTableOptions].

type DropTypeOption

type DropTypeOption = Builder[DropTypeOptions]

DropTypeOption configures a DropType operation. You can use the fluent-style builder or a pointer to DropTypeOptions interchangeably.

Example using the fluent builder (DropType):

// No need to use pointer for builder; the builder handles that for you.
opts := options.DropType().SetIfExists(false)

Example using a pointer to DropTypeOptions without the fluent builder:

opts := &options.DropTypeOptions{IfExists: ptr.To(false)}

type DropTypeOptions

type DropTypeOptions struct {
	// IfExists if true, the command will silently succeed even if a type
	// with the given name does not exist.
	IfExists *bool `json:"ifExists,omitempty"`

	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Command hierarchy.
	APIOptions *APIOptions `json:"-" optlift:"Keyspace"`
}

DropTypeOptions represents options for dropping a user-defined type.

func (*DropTypeOptions) Children
func (o *DropTypeOptions) Children() []any

Children implements ChildValidator for DropTypeOptions. Returns all non-nil option fields.

func (*DropTypeOptions) Setters
func (o *DropTypeOptions) Setters() []func(*DropTypeOptions)

Setters implements Builder[DropTypeOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[DropTypeOptions].

type EmbeddingHeadersProvider

type EmbeddingHeadersProvider interface {
	GetEmbeddingHeaders(ctx context.Context) (map[string]string, error)
}

EmbeddingHeadersProvider is an interface for providing headers for embedding services (e.g. $vectorize).

func NewAWSEmbeddingHeadersProvider
func NewAWSEmbeddingHeadersProvider(accessKeyID, secretAccessKey string) EmbeddingHeadersProvider

NewAWSEmbeddingHeadersProvider creates an EmbeddingHeadersProvider for AWS-based embedding providers. It sets the x-embedding-access-id and x-embedding-secret-id headers.

func NewEmbeddingAPIKeyHeadersProvider
func NewEmbeddingAPIKeyHeadersProvider(apiKey string) EmbeddingHeadersProvider

NewEmbeddingAPIKeyHeadersProvider creates an EmbeddingHeadersProvider that returns the x-embedding-api-key header.

type FindAvailableRegionsOption

type FindAvailableRegionsOption = Builder[FindAvailableRegionsOptions]

FindAvailableRegionsOption configures a FindAvailableRegions operation. You can use the fluent-style builder or a pointer to FindAvailableRegionsOptions interchangeably.

Example using the fluent builder (FindAvailableRegions):

// No need to use pointer for builder; the builder handles that for you.
opts := options.FindAvailableRegions().SetFilterByOrg(false)

Example using a pointer to FindAvailableRegionsOptions without the fluent builder:

opts := &options.FindAvailableRegionsOptions{FilterByOrg: ptr.To(false)}

type FindAvailableRegionsOptions

type FindAvailableRegionsOptions struct {
	// FilterByOrg filters by organization access. Whether to only return regions that
	// can be used by the caller's organization.
	FilterByOrg *bool

	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→Admin hierarchy.
	APIOptions *APIOptions
}

FindAvailableRegionsOptions represents options for the FindAvailableRegions operation.

func (*FindAvailableRegionsOptions) Children
func (o *FindAvailableRegionsOptions) Children() []any

Children implements ChildValidator for FindAvailableRegionsOptions. Returns all non-nil option fields.

func (*FindAvailableRegionsOptions) Setters
func (o *FindAvailableRegionsOptions) Setters() []func(*FindAvailableRegionsOptions)

Setters implements Builder[FindAvailableRegionsOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[FindAvailableRegionsOptions].

type FindEmbeddingProvidersOption

type FindEmbeddingProvidersOption = Builder[FindEmbeddingProvidersOptions]

FindEmbeddingProvidersOption configures a FindEmbeddingProviders operation. You can use the fluent-style builder or a pointer to FindEmbeddingProvidersOptions interchangeably.

Example using the fluent builder (FindEmbeddingProviders):

// No need to use pointer for builder; the builder handles that for you.
opts := options.FindEmbeddingProviders().SetKeyspace("value")

Example using a pointer to FindEmbeddingProvidersOptions without the fluent builder:

opts := &options.FindEmbeddingProvidersOptions{Keyspace: ptr.To("value")}

type FindEmbeddingProvidersOptions

type FindEmbeddingProvidersOptions struct {
	// FilterModelStatus filters models by their lifecycle status.
	//
	//   - If not provided: defaults to SUPPORTED models only.
	//   - If set to ModelLifecycleStatusAll (""): includes all statuses (SUPPORTED, DEPRECATED, END_OF_LIFE).
	//   - If set to a specific status: includes only models with that status.
	//
	// Example:
	//
	//	// Only supported models (default behavior)
	//	options.FindEmbeddingProviders().SetFilterModelStatus(options.ModelLifecycleStatusSupported)
	//
	//	// All models regardless of status
	//	options.FindEmbeddingProviders().SetFilterModelStatus(options.ModelLifecycleStatusAll)
	//
	//	// Only deprecated models
	//	options.FindEmbeddingProviders().SetFilterModelStatus(options.ModelLifecycleStatusDeprecated)
	FilterModelStatus *ModelLifecycleStatus `json:"filterModelStatus,omitempty"`

	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Command hierarchy.
	APIOptions *APIOptions `json:"-" optlift:"Keyspace"`
}

FindEmbeddingProvidersOptions represents options for the FindEmbeddingProviders operation.

func (*FindEmbeddingProvidersOptions) Children
func (o *FindEmbeddingProvidersOptions) Children() []any

Children implements ChildValidator for FindEmbeddingProvidersOptions. Returns all non-nil option fields.

func (*FindEmbeddingProvidersOptions) Setters
func (o *FindEmbeddingProvidersOptions) Setters() []func(*FindEmbeddingProvidersOptions)

Setters implements Builder[FindEmbeddingProvidersOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[FindEmbeddingProvidersOptions].

type GetCollectionOption

type GetCollectionOption = Builder[GetCollectionOptions]

GetCollectionOption configures a GetCollection operation. You can use the fluent-style builder or a pointer to GetCollectionOptions interchangeably.

Example using the fluent builder (GetCollection):

// No need to use pointer for builder; the builder handles that for you.
opts := options.GetCollection().SetKeyspace("value")

Example using a pointer to GetCollectionOptions without the fluent builder:

opts := &options.GetCollectionOptions{Keyspace: ptr.To("value")}

type GetCollectionOptions

type GetCollectionOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Collection→Command hierarchy.
	APIOptions *APIOptions `json:"-" optlift:"Keyspace,EmbeddingHeadersProvider,RerankingHeadersProvider"`
}

GetCollectionOptions represents options for getting a collection handle.

func (*GetCollectionOptions) Children
func (o *GetCollectionOptions) Children() []any

Children implements ChildValidator for GetCollectionOptions. Returns all non-nil option fields.

func (*GetCollectionOptions) Setters
func (o *GetCollectionOptions) Setters() []func(*GetCollectionOptions)

Setters implements Builder[GetCollectionOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[GetCollectionOptions].

type GetTableOption

type GetTableOption = Builder[GetTableOptions]

GetTableOption configures a GetTable operation. You can use the fluent-style builder or a pointer to GetTableOptions interchangeably.

Example using the fluent builder (GetTable):

// No need to use pointer for builder; the builder handles that for you.
opts := options.GetTable().SetKeyspace("value")

Example using a pointer to GetTableOptions without the fluent builder:

opts := &options.GetTableOptions{Keyspace: ptr.To("value")}

type GetTableOptions

type GetTableOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Table→Command hierarchy.
	APIOptions *APIOptions `json:"-" optlift:"Keyspace,EmbeddingHeadersProvider,RerankingHeadersProvider"`
}

GetTableOptions represents options for getting a table handle.

func (*GetTableOptions) Children
func (o *GetTableOptions) Children() []any

Children implements ChildValidator for GetTableOptions. Returns all non-nil option fields.

func (*GetTableOptions) Setters
func (o *GetTableOptions) Setters() []func(*GetTableOptions)

Setters implements Builder[GetTableOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[GetTableOptions].

type Headers

type Headers map[string]string

Headers is a custom map type that implements ShouldMerge to accumulate headers additively.

func (Headers) Merge
func (h Headers) Merge(other ShouldMerge) ShouldMerge

Merge implements ShouldMerge for Headers.

type IndexingOption

type IndexingOption = Builder[IndexingOptions]

IndexingOption configures a Indexing operation. You can use the fluent-style builder or a pointer to IndexingOptions interchangeably.

Example using the fluent builder (Indexing):

opts := options.Indexing().SetAllow(...)

Example using a pointer to IndexingOptions without the fluent builder:

opts := &options.IndexingOptions{...}

type IndexingOptions

type IndexingOptions struct {
	// Allow is a list of field paths to index, or ["*"] to index all fields.
	// Mutually exclusive with Deny.
	Allow []string `json:"allow,omitempty"`

	// Deny is a list of field paths to exclude from indexing, or ["*"] to disable indexing entirely.
	// Mutually exclusive with Allow.
	Deny []string `json:"deny,omitempty"`
}

IndexingOptions holds options for collection indexing. Only one of `Allow` or `Deny` can be specified.

func (*IndexingOptions) Setters
func (o *IndexingOptions) Setters() []func(*IndexingOptions)

Setters implements Builder[IndexingOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[IndexingOptions].

func (*IndexingOptions) Validate
func (o *IndexingOptions) Validate() error

Validate implements Validator for IndexingOptions.

type LexicalOption

type LexicalOption = Builder[LexicalOptions]

LexicalOption configures a Lexical operation. You can use the fluent-style builder or a pointer to LexicalOptions interchangeably.

Example using the fluent builder (Lexical):

// No need to use pointer for builder; the builder handles that for you.
opts := options.Lexical().SetEnabled(false)

Example using a pointer to LexicalOptions without the fluent builder:

opts := &options.LexicalOptions{Enabled: ptr.To(false)}

type LexicalOptions

type LexicalOptions struct {
	// Enabled specifies whether lexical search is enabled for the collection.
	Enabled *bool `json:"enabled,omitempty"`

	// Analyzer specifies the analyzer to use for lexical search.
	Analyzer any `json:"analyzer,omitempty"`
}

LexicalOptions configures lexical search (BM25) for a collection.

func (*LexicalOptions) Setters
func (o *LexicalOptions) Setters() []func(*LexicalOptions)

Setters implements Builder[LexicalOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[LexicalOptions].

type ListCollectionsOption

type ListCollectionsOption = Builder[ListCollectionsOptions]

ListCollectionsOption configures a ListCollections operation. You can use the fluent-style builder or a pointer to ListCollectionsOptions interchangeably.

Example using the fluent builder (ListCollections):

// No need to use pointer for builder; the builder handles that for you.
opts := options.ListCollections().SetKeyspace("value")

Example using a pointer to ListCollectionsOptions without the fluent builder:

opts := &options.ListCollectionsOptions{Keyspace: ptr.To("value")}

type ListCollectionsOptions

type ListCollectionsOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Command hierarchy.
	APIOptions *APIOptions `optlift:"Keyspace"`
}

ListCollectionsOptions represents options for listing collections in a database. Right now this is empty except for APIOptions, but leaving it here for future-proofing.

func (*ListCollectionsOptions) Children
func (o *ListCollectionsOptions) Children() []any

Children implements ChildValidator for ListCollectionsOptions. Returns all non-nil option fields.

func (*ListCollectionsOptions) Setters
func (o *ListCollectionsOptions) Setters() []func(*ListCollectionsOptions)

Setters implements Builder[ListCollectionsOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[ListCollectionsOptions].

type ListDatabasesOption

type ListDatabasesOption = Builder[ListDatabasesOptions]

ListDatabasesOption configures a ListDatabases operation. You can use the fluent-style builder or a pointer to ListDatabasesOptions interchangeably.

Example using the fluent builder (ListDatabases):

// No need to use pointer for builder; the builder handles that for you.
opts := options.ListDatabases().SetLimit(42)

Example using a pointer to ListDatabasesOptions without the fluent builder:

opts := &options.ListDatabasesOptions{Limit: ptr.To(42)}

type ListDatabasesOptions

type ListDatabasesOptions struct {
	// Include filters databases by status. Defaults to [DatabaseStatusNonTerminated].
	Include *DatabaseStatus
	// Provider filters databases by cloud provider. Defaults to [CloudProviderAll].
	Provider *CloudProviderFilter
	// Limit is the maximum number of databases to return (1-100). Defaults to 25.
	Limit *int
	// StartingAfter is a database ID to use with pagination. Pass the DB ID of the
	// last item on the previous page to get the next page.
	StartingAfter *string

	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→Admin hierarchy.
	APIOptions *APIOptions
}

ListDatabasesOptions represents options for the ListDatabases operation.

func (*ListDatabasesOptions) Children
func (o *ListDatabasesOptions) Children() []any

Children implements ChildValidator for ListDatabasesOptions. Returns all non-nil option fields.

func (*ListDatabasesOptions) Setters
func (o *ListDatabasesOptions) Setters() []func(*ListDatabasesOptions)

Setters implements Builder[ListDatabasesOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[ListDatabasesOptions].

type ListIndexesOption

type ListIndexesOption = Builder[ListIndexesOptions]

ListIndexesOption configures a ListIndexes operation. You can use the fluent-style builder or a pointer to ListIndexesOptions interchangeably.

Example using the fluent builder (ListIndexes):

opts := options.ListIndexes().SetAPIOptions(...)

Example using a pointer to ListIndexesOptions without the fluent builder:

opts := &options.ListIndexesOptions{...}

type ListIndexesOptions

type ListIndexesOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Table→Command hierarchy.
	APIOptions *APIOptions
}

ListIndexesOptions represents options for listing indexes.

func (*ListIndexesOptions) Children
func (o *ListIndexesOptions) Children() []any

Children implements ChildValidator for ListIndexesOptions. Returns all non-nil option fields.

func (*ListIndexesOptions) Setters
func (o *ListIndexesOptions) Setters() []func(*ListIndexesOptions)

Setters implements Builder[ListIndexesOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[ListIndexesOptions].

type ListKeyspacesOption

type ListKeyspacesOption = Builder[ListKeyspacesOptions]

ListKeyspacesOption configures a ListKeyspaces operation. You can use the fluent-style builder or a pointer to ListKeyspacesOptions interchangeably.

Example using the fluent builder (ListKeyspaces):

opts := options.ListKeyspaces().SetAPIOptions(...)

Example using a pointer to ListKeyspacesOptions without the fluent builder:

opts := &options.ListKeyspacesOptions{...}

type ListKeyspacesOptions

type ListKeyspacesOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Table→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

ListKeyspacesOptions represents options for listing the keyspaces in a database. Right now this is empty except for APIOptions, but leaving it here for future-proofing.

func (*ListKeyspacesOptions) Children
func (o *ListKeyspacesOptions) Children() []any

Children implements ChildValidator for ListKeyspacesOptions. Returns all non-nil option fields.

func (*ListKeyspacesOptions) Setters
func (o *ListKeyspacesOptions) Setters() []func(*ListKeyspacesOptions)

Setters implements Builder[ListKeyspacesOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[ListKeyspacesOptions].

type ListTablesOption

type ListTablesOption = Builder[ListTablesOptions]

ListTablesOption configures a ListTables operation. You can use the fluent-style builder or a pointer to ListTablesOptions interchangeably.

Example using the fluent builder (ListTables):

// No need to use pointer for builder; the builder handles that for you.
opts := options.ListTables().SetKeyspace("value")

Example using a pointer to ListTablesOptions without the fluent builder:

opts := &options.ListTablesOptions{Keyspace: ptr.To("value")}

type ListTablesOptions

type ListTablesOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Command hierarchy.
	APIOptions *APIOptions `optlift:"Keyspace"`
}

ListTablesOptions represents options for listing tables in a database with full metadata. Right now this is empty except for APIOptions, but leaving it here for future-proofing.

func (*ListTablesOptions) Children
func (o *ListTablesOptions) Children() []any

Children implements ChildValidator for ListTablesOptions. Returns all non-nil option fields.

func (*ListTablesOptions) Setters
func (o *ListTablesOptions) Setters() []func(*ListTablesOptions)

Setters implements Builder[ListTablesOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[ListTablesOptions].

type ListTypesOption

type ListTypesOption = Builder[ListTypesOptions]

ListTypesOption configures a ListTypes operation. You can use the fluent-style builder or a pointer to ListTypesOptions interchangeably.

Example using the fluent builder (ListTypes):

// No need to use pointer for builder; the builder handles that for you.
opts := options.ListTypes().SetKeyspace("value")

Example using a pointer to ListTypesOptions without the fluent builder:

opts := &options.ListTypesOptions{Keyspace: ptr.To("value")}

type ListTypesOptions

type ListTypesOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Command hierarchy.
	APIOptions *APIOptions `json:"-" optlift:"Keyspace"`
}

ListTypesOptions represents options for listing user-defined types in a database.

func (*ListTypesOptions) Children
func (o *ListTypesOptions) Children() []any

Children implements ChildValidator for ListTypesOptions. Returns all non-nil option fields.

func (*ListTypesOptions) Setters
func (o *ListTypesOptions) Setters() []func(*ListTypesOptions)

Setters implements Builder[ListTypesOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[ListTypesOptions].

type ModelLifecycleStatus

type ModelLifecycleStatus string

ModelLifecycleStatus is the lifecycle status of an embedding provider model, used to filter models returned by FindEmbeddingProviders.

Use ModelLifecycleStatusAll ("") to include models of every status.

const (
	// ModelLifecycleStatusAll includes models of every lifecycle status.
	// Equivalent to passing an empty string to the API.
	ModelLifecycleStatusAll ModelLifecycleStatus = ""
	// ModelLifecycleStatusSupported includes only actively supported models (the default).
	ModelLifecycleStatusSupported ModelLifecycleStatus = ModelLifecycleStatus(constants.ModelLifecycleStatusSupported)
	// ModelLifecycleStatusDeprecated includes only deprecated models.
	ModelLifecycleStatusDeprecated ModelLifecycleStatus = ModelLifecycleStatus(constants.ModelLifecycleStatusDeprecated)
	// ModelLifecycleStatusEndOfLife includes only end-of-life models.
	ModelLifecycleStatusEndOfLife ModelLifecycleStatus = ModelLifecycleStatus(constants.ModelLifecycleStatusEndOfLife)
)

type RerankOption

type RerankOption = Builder[RerankOptions]

RerankOption configures a Rerank operation. You can use the fluent-style builder or a pointer to RerankOptions interchangeably.

Example using the fluent builder (Rerank):

// No need to use pointer for builder; the builder handles that for you.
opts := options.Rerank().SetEnabled(false)

Example using a pointer to RerankOptions without the fluent builder:

opts := &options.RerankOptions{Enabled: ptr.To(false)}

type RerankOptions

type RerankOptions struct {
	// Enabled specifies whether reranking is enabled for the collection.
	Enabled *bool `json:"enabled,omitempty"`

	// Service configures the reranking service.
	Service *RerankServiceOptions `json:"service,omitempty"`
}

RerankOptions configures reranking for a collection.

func (*RerankOptions) Children
func (o *RerankOptions) Children() []any

Children implements ChildValidator for RerankOptions. Returns all non-nil option fields.

func (*RerankOptions) Setters
func (o *RerankOptions) Setters() []func(*RerankOptions)

Setters implements Builder[RerankOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[RerankOptions].

type RerankServiceOption

type RerankServiceOption = Builder[RerankServiceOptions]

RerankServiceOption configures a RerankService operation. You can use the fluent-style builder or a pointer to RerankServiceOptions interchangeably.

Example using the fluent builder (RerankService):

// No need to use pointer for builder; the builder handles that for you.
opts := options.RerankService().SetProvider("value")

Example using a pointer to RerankServiceOptions without the fluent builder:

opts := &options.RerankServiceOptions{Provider: ptr.To("value")}

type RerankServiceOptions

type RerankServiceOptions struct {
	// Provider is the name of the reranking provider (e.g., "nvidia").
	Provider *string `json:"provider,omitempty"`

	// ModelName is the name of the reranking model to use.
	ModelName *string `json:"modelName,omitempty"`

	// Authentication holds any necessary collection-bound authentication credentials.
	Authentication map[string]any `json:"authentication,omitempty"`

	// Parameters holds arbitrary parameters that may be required on a per-model or
	// per-provider basis.
	Parameters map[string]any `json:"parameters,omitempty"`
}

RerankServiceOptions configures the reranking service.

func (*RerankServiceOptions) Setters
func (o *RerankServiceOptions) Setters() []func(*RerankServiceOptions)

Setters implements Builder[RerankServiceOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[RerankServiceOptions].

type RerankingHeadersProvider

type RerankingHeadersProvider interface {
	GetRerankingHeaders(ctx context.Context) (map[string]string, error)
}

RerankingHeadersProvider is an interface for providing headers for reranking services.

func NewRerankingAPIKeyHeadersProvider
func NewRerankingAPIKeyHeadersProvider(apiKey string) RerankingHeadersProvider

NewRerankingAPIKeyHeadersProvider creates a RerankingHeadersProvider that returns the x-rerank-api-key header.

type ReturnDocument

type ReturnDocument string

ReturnDocument specifies whether to return the document before or after the update.

const (
	// ReturnDocumentBefore returns the document as it was before the update.
	ReturnDocumentBefore ReturnDocument = "before"
	// ReturnDocumentAfter returns the document as it is after the update.
	ReturnDocumentAfter ReturnDocument = "after"
)

type SerdesOption

type SerdesOption = Builder[SerdesOptions]

SerdesOption configures a Serdes operation. You can use the fluent-style builder or a pointer to SerdesOptions interchangeably.

Example using the fluent builder (Serdes):

// No need to use pointer for builder; the builder handles that for you.
opts := options.Serdes().SetTrustRawMessage(false)

Example using a pointer to SerdesOptions without the fluent builder:

opts := &options.SerdesOptions{TrustRawMessage: ptr.To(false)}

type SerdesOptions

type SerdesOptions struct {
	// Serialization flags
	TrustRawMessage *bool
	SortMapKeys     *bool
	SerNoCache      *bool
	UseJSONMarshal  *bool

	// Deserialization flags
	SparseRows           *bool
	UseNumber            *bool
	DesNoCache           *bool
	ExtendedErrorContext *bool
	UseJSONUnmarshal     *bool
}

SerdesOptions contains options for serialization and deserialization behavior.

func (*SerdesOptions) GetDesFlags
func (o *SerdesOptions) GetDesFlags() serdes.DesFlags

GetDesFlags returns the aggregated deserialization flags.

func (*SerdesOptions) GetSerFlags
func (o *SerdesOptions) GetSerFlags() serdes.SerFlags

GetSerFlags returns the aggregated serialization flags.

func (*SerdesOptions) Merge
func (o *SerdesOptions) Merge(other ShouldMerge) ShouldMerge

Merge implements ShouldMerge for SerdesOptions.

func (*SerdesOptions) Setters
func (o *SerdesOptions) Setters() []func(*SerdesOptions)

Setters implements Builder[SerdesOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[SerdesOptions].

type ShouldMerge

type ShouldMerge interface {
	Merge(other ShouldMerge) ShouldMerge
}

ShouldMerge is implemented by options types whose pointer fields should be merged sub-field-by-sub-field rather than replaced wholesale when encountered during a copyNonNilFields pass. Implementations must handle nil receivers gracefully.

type TableDefinitionOption

type TableDefinitionOption = Builder[TableDefinitionOptions]

TableDefinitionOption configures a TableDefinition operation. You can use the fluent-style builder or a pointer to TableDefinitionOptions interchangeably.

Example using the fluent builder (TableDefinition):

opts := options.TableDefinition().SetAPIOptions(...)

Example using a pointer to TableDefinitionOptions without the fluent builder:

opts := &options.TableDefinitionOptions{...}

type TableDefinitionOptions

type TableDefinitionOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Table→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

TableDefinitionOptions represents options for fetching a table's descriptor. Right now this is empty except for APIOptions, but leaving it here for future-proofing.

func (*TableDefinitionOptions) Children
func (o *TableDefinitionOptions) Children() []any

Children implements ChildValidator for TableDefinitionOptions. Returns all non-nil option fields.

func (*TableDefinitionOptions) Setters
func (o *TableDefinitionOptions) Setters() []func(*TableDefinitionOptions)

Setters implements Builder[TableDefinitionOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[TableDefinitionOptions].

type TableDeleteManyOption

type TableDeleteManyOption = Builder[TableDeleteManyOptions]

TableDeleteManyOption configures a TableDeleteMany operation. You can use the fluent-style builder or a pointer to TableDeleteManyOptions interchangeably.

Example using the fluent builder (TableDeleteMany):

opts := options.TableDeleteMany().SetAPIOptions(...)

Example using a pointer to TableDeleteManyOptions without the fluent builder:

opts := &options.TableDeleteManyOptions{...}

type TableDeleteManyOptions

type TableDeleteManyOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Table→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

TableDeleteManyOptions represents options for deleting multiple rows in a table. Right now this is empty except for APIOptions; table deleteMany has no pagination currently, etc.

func (*TableDeleteManyOptions) Children
func (o *TableDeleteManyOptions) Children() []any

Children implements ChildValidator for TableDeleteManyOptions. Returns all non-nil option fields.

func (*TableDeleteManyOptions) Setters
func (o *TableDeleteManyOptions) Setters() []func(*TableDeleteManyOptions)

Setters implements Builder[TableDeleteManyOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[TableDeleteManyOptions].

type TableDeleteOneOption

type TableDeleteOneOption = Builder[TableDeleteOneOptions]

TableDeleteOneOption configures a TableDeleteOne operation. You can use the fluent-style builder or a pointer to TableDeleteOneOptions interchangeably.

Example using the fluent builder (TableDeleteOne):

opts := options.TableDeleteOne().SetAPIOptions(...)

Example using a pointer to TableDeleteOneOptions without the fluent builder:

opts := &options.TableDeleteOneOptions{...}

type TableDeleteOneOptions

type TableDeleteOneOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Table→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

TableDeleteOneOptions represents options for deleting a single row in a table. Right now this is empty except for APIOptions, but leaving it here for future-proofing.

func (*TableDeleteOneOptions) Children
func (o *TableDeleteOneOptions) Children() []any

Children implements ChildValidator for TableDeleteOneOptions. Returns all non-nil option fields.

func (*TableDeleteOneOptions) Setters
func (o *TableDeleteOneOptions) Setters() []func(*TableDeleteOneOptions)

Setters implements Builder[TableDeleteOneOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[TableDeleteOneOptions].

type TableFindOneOption

type TableFindOneOption = Builder[TableFindOneOptions]

TableFindOneOption configures a TableFindOne operation. You can use the fluent-style builder or a pointer to TableFindOneOptions interchangeably.

Example using the fluent builder (TableFindOne):

// No need to use pointer for builder; the builder handles that for you.
opts := options.TableFindOne().SetIncludeSimilarity(false)

Example using a pointer to TableFindOneOptions without the fluent builder:

opts := &options.TableFindOneOptions{IncludeSimilarity: ptr.To(false)}

type TableFindOneOptions

type TableFindOneOptions struct {
	// Sort specifies the sort order to apply before selecting the document to update.
	Sort sort.Sortable `json:"sort,omitempty"`
	// Projection controls which fields are included or excluded in the returned document.
	Projection map[string]any `json:"projection,omitempty"`
	// IncludeSimilarity if true, include the similarity score in the result via the
	// $similarity field.
	IncludeSimilarity *bool `json:"includeSimilarity,omitempty"`
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Table→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

TableFindOneOptions represents options for a findOne operation.

func (*TableFindOneOptions) Children
func (o *TableFindOneOptions) Children() []any

Children implements ChildValidator for TableFindOneOptions. Returns all non-nil option fields.

func (*TableFindOneOptions) Setters
func (o *TableFindOneOptions) Setters() []func(*TableFindOneOptions)

Setters implements Builder[TableFindOneOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[TableFindOneOptions].

type TableFindOption

type TableFindOption = Builder[TableFindOptions]

TableFindOption configures a TableFind operation. You can use the fluent-style builder or a pointer to TableFindOptions interchangeably.

Example using the fluent builder (TableFind):

// No need to use pointer for builder; the builder handles that for you.
opts := options.TableFind().SetLimit(42)

Example using a pointer to TableFindOptions without the fluent builder:

opts := &options.TableFindOptions{Limit: ptr.To(42)}

type TableFindOptions

type TableFindOptions struct {
	// Sort specifies how to sort the results. Can be used for:
	//  - Ascending/descending sort on columns: sort.Asc("rating").Desc("title")
	//  - Vector search with a vector: sort.Vector([]float32{0.1, 0.2, 0.3})
	//  - Vector search with vectorize: sort.Vectorize("search text")
	Sort sort.Sortable `json:"sort,omitempty"`

	// Projection controls which columns are included or excluded in the returned rows
	// Use true to include a column, false to exclude it
	Projection map[string]any `json:"projection,omitempty"`

	// Limit limits the total number of rows returned
	Limit *int `json:"limit,omitempty"`

	// Skip specifies the number of rows to bypass before returning rows.
	// Only valid with ascending/descending sort, not with vector search.
	Skip *int `json:"skip,omitempty"`

	// IncludeSimilarity if true, includes a $similarity property in the response
	// for vector searches. Only works with direct vector search, not vectorize.
	IncludeSimilarity *bool `json:"includeSimilarity,omitempty"`

	// IncludeSortVector if true, includes the sort vector in the response.
	// Useful for vector searches using $vectorize.
	IncludeSortVector *bool `json:"includeSortVector,omitempty"`

	// InitialPageState is used for pagination to fetch the next page of results
	InitialPageState *string `json:"pageState,omitempty"`

	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Table→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

TableFindOptions represents options for finding rows in a table

func (*TableFindOptions) Children
func (o *TableFindOptions) Children() []any

Children implements ChildValidator for TableFindOptions. Returns all non-nil option fields.

func (*TableFindOptions) Setters
func (o *TableFindOptions) Setters() []func(*TableFindOptions)

Setters implements Builder[TableFindOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[TableFindOptions].

type TableInsertManyOption

type TableInsertManyOption = Builder[TableInsertManyOptions]

TableInsertManyOption configures a TableInsertMany operation. You can use the fluent-style builder or a pointer to TableInsertManyOptions interchangeably.

Example using the fluent builder (TableInsertMany):

// No need to use pointer for builder; the builder handles that for you.
opts := options.TableInsertMany().SetOrdered(false)

Example using a pointer to TableInsertManyOptions without the fluent builder:

opts := &options.TableInsertManyOptions{Ordered: ptr.To(false)}

type TableInsertManyOptions

type TableInsertManyOptions struct {
	Ordered     *bool `json:"ordered,omitempty"`
	ChunkSize   *int  `json:"-"`
	Concurrency *int  `json:"-"`

	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Table→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

TableInsertManyOptions represents options for inserting multiple rows in a table. Right now this is empty except for APIOptions, but leaving it here for future-proofing.

func (*TableInsertManyOptions) Children
func (o *TableInsertManyOptions) Children() []any

Children implements ChildValidator for TableInsertManyOptions. Returns all non-nil option fields.

func (*TableInsertManyOptions) Setters
func (o *TableInsertManyOptions) Setters() []func(*TableInsertManyOptions)

Setters implements Builder[TableInsertManyOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[TableInsertManyOptions].

type TableInsertOneOption

type TableInsertOneOption = Builder[TableInsertOneOptions]

TableInsertOneOption configures a TableInsertOne operation. You can use the fluent-style builder or a pointer to TableInsertOneOptions interchangeably.

Example using the fluent builder (TableInsertOne):

opts := options.TableInsertOne().SetAPIOptions(...)

Example using a pointer to TableInsertOneOptions without the fluent builder:

opts := &options.TableInsertOneOptions{...}

type TableInsertOneOptions

type TableInsertOneOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Table→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

TableInsertOneOptions represents options for inserting a single row in a table. Right now this is empty except for APIOptions, but leaving it here for future-proofing.

func (*TableInsertOneOptions) Children
func (o *TableInsertOneOptions) Children() []any

Children implements ChildValidator for TableInsertOneOptions. Returns all non-nil option fields.

func (*TableInsertOneOptions) Setters
func (o *TableInsertOneOptions) Setters() []func(*TableInsertOneOptions)

Setters implements Builder[TableInsertOneOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[TableInsertOneOptions].

type TableUpdateOneOption

type TableUpdateOneOption = Builder[TableUpdateOneOptions]

TableUpdateOneOption configures a TableUpdateOne operation. You can use the fluent-style builder or a pointer to TableUpdateOneOptions interchangeably.

Example using the fluent builder (TableUpdateOne):

opts := options.TableUpdateOne().SetAPIOptions(...)

Example using a pointer to TableUpdateOneOptions without the fluent builder:

opts := &options.TableUpdateOneOptions{...}

type TableUpdateOneOptions

type TableUpdateOneOptions struct {
	// APIOptions overrides API-level settings (token, timeout, headers, etc.)
	// for this command. These are merged into the Client→DB→Table→Command hierarchy.
	APIOptions *APIOptions `json:"-"`
}

TableUpdateOneOptions represents options for updating a single row in a table. Right now this is empty except for APIOptions, but leaving it here for future-proofing.

func (*TableUpdateOneOptions) Children
func (o *TableUpdateOneOptions) Children() []any

Children implements ChildValidator for TableUpdateOneOptions. Returns all non-nil option fields.

func (*TableUpdateOneOptions) Setters
func (o *TableUpdateOneOptions) Setters() []func(*TableUpdateOneOptions)

Setters implements Builder[TableUpdateOneOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[TableUpdateOneOptions].

type TimeoutOption

type TimeoutOption = Builder[TimeoutOptions]

TimeoutOption configures a Timeout operation. You can use the fluent-style builder or a pointer to TimeoutOptions interchangeably.

Example using the fluent builder (Timeout):

// No need to use pointer for builder; the builder handles that for you.
opts := options.Timeout().SetRequest(10 * time.Second)

Example using a pointer to TimeoutOptions without the fluent builder:

opts := &options.TimeoutOptions{Request: ptr.To(10 * time.Second)}

type TimeoutOptions

type TimeoutOptions struct {
	// Request is the timeout for individual HTTP requests
	Request *time.Duration
	// Connection is the timeout for establishing connections
	Connection *time.Duration
	// BulkOperation is the timeout for bulk operations like insertMany
	BulkOperation *time.Duration
	// GeneralMethod is the overall timeout for paginated operations like deleteMany and updateMany.
	// When set, the entire multi-page operation must complete within this duration.
	GeneralMethod *time.Duration
}

TimeoutOptions contains timeout configuration for API operations.

func (*TimeoutOptions) GetBulkOperation
func (o *TimeoutOptions) GetBulkOperation() time.Duration

GetBulkOperation returns the bulk operation timeout or 0 if not set.

func (*TimeoutOptions) GetConnection
func (o *TimeoutOptions) GetConnection() time.Duration

GetConnection returns the connection timeout or 0 if not set.

func (*TimeoutOptions) GetGeneralMethod
func (o *TimeoutOptions) GetGeneralMethod() *time.Duration

GetGeneralMethod returns the general method timeout or nil if not set.

func (*TimeoutOptions) GetRequest
func (o *TimeoutOptions) GetRequest() time.Duration

GetRequest returns the request timeout or 30 seconds if not set.

func (*TimeoutOptions) Merge
func (o *TimeoutOptions) Merge(other ShouldMerge) ShouldMerge

Merge implements ShouldMerge for TimeoutOptions.

func (*TimeoutOptions) Setters
func (o *TimeoutOptions) Setters() []func(*TimeoutOptions)

Setters implements Builder[TimeoutOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[TimeoutOptions].

type TokenProvider

type TokenProvider interface {
	// Token returns the token to be used for the current request.
	Token(ctx context.Context) (string, error)
}

TokenProvider is an interface for providing authentication tokens dynamically.

func NewStaticTokenProvider
func NewStaticTokenProvider(token string) TokenProvider

NewStaticTokenProvider creates a new StaticTokenProvider with the given token.

func NewUsernamePasswordTokenProvider
func NewUsernamePasswordTokenProvider(username, password string) TokenProvider

NewUsernamePasswordTokenProvider creates a new TokenProvider that encodes the username and password in the format expected by DSE/HCD.

type Validator

type Validator interface {
	Validate() error
}

type VectorMetric

type VectorMetric string

VectorMetric represents the similarity measurement for vector search.

const (
	MetricCosine     VectorMetric = "cosine"
	MetricDotProduct VectorMetric = "dot_product"
	MetricEuclidean  VectorMetric = "euclidean"
)

Metric constants for vector index similarity measurement

type VectorOption

type VectorOption = Builder[VectorOptions]

VectorOption configures a Vector operation. You can use the fluent-style builder or a pointer to VectorOptions interchangeably.

Example using the fluent builder (Vector):

// No need to use pointer for builder; the builder handles that for you.
opts := options.Vector().SetDimension(42)

Example using a pointer to VectorOptions without the fluent builder:

opts := &options.VectorOptions{Dimension: ptr.To(42)}

type VectorOptions

type VectorOptions struct {
	// Dimension specifies the dimension of vectors stored in this collection.
	// Required for vector-enabled collections.
	Dimension *int `json:"dimension,omitempty"`

	// Metric specifies the similarity metric used for vector search.
	// Valid values are "cosine", "euclidean", or "dot_product".
	// Default is "cosine".
	Metric *string `json:"metric,omitempty"`

	// Service configures automatic vector embedding generation (vectorize).
	Service *VectorServiceOptions `json:"service,omitempty"`
}

VectorOptions configures vector search for a collection.

func (*VectorOptions) Children
func (o *VectorOptions) Children() []any

Children implements ChildValidator for VectorOptions. Returns all non-nil option fields.

func (*VectorOptions) Setters
func (o *VectorOptions) Setters() []func(*VectorOptions)

Setters implements Builder[VectorOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[VectorOptions].

type VectorServiceOption

type VectorServiceOption = Builder[VectorServiceOptions]

VectorServiceOption configures a VectorService operation. You can use the fluent-style builder or a pointer to VectorServiceOptions interchangeably.

Example using the fluent builder (VectorService):

// No need to use pointer for builder; the builder handles that for you.
opts := options.VectorService().SetProvider("value")

Example using a pointer to VectorServiceOptions without the fluent builder:

opts := &options.VectorServiceOptions{Provider: ptr.To("value")}

type VectorServiceOptions

type VectorServiceOptions struct {
	// Provider is the name of the embedding provider which provides the model to use
	// (e.g., "openai", "nvidia").
	Provider *string `json:"provider,omitempty"`

	// ModelName is the name of the embedding model to use.
	// Use "endpoint-defined-model" for providers like huggingfaceDedicated where the
	// model is defined by the endpoint rather than selected by name.
	ModelName *string `json:"modelName,omitempty"`

	// Authentication holds any necessary collection-bound authentication credentials.
	//
	// Most commonly, set providerKey to the name of a key stored in the Astra KMS
	// (Astra portal integration) to use for SHARED_SECRET authentication:
	//
	//	Authentication: map[string]any{"providerKey": "*KEY_NAME*"}
	Authentication map[string]any `json:"authentication,omitempty"`

	// Parameters holds arbitrary parameters that may be required on a per-model or
	// per-provider basis. Not all providers require parameters.
	//
	// Example (openai, optional projectId):
	//
	//	Parameters: map[string]any{"projectId": "my-project"}
	Parameters map[string]any `json:"parameters,omitempty"`
}

VectorServiceOptions configures the embedding service for vectorize, to automatically transform text into a vector ready for semantic vector searching.

You can find out more information about each provider/model in the DataStax docs, or through [DatabaseAdmin.FindEmbeddingProviders].

func (*VectorServiceOptions) Setters
func (o *VectorServiceOptions) Setters() []func(*VectorServiceOptions)

Setters implements Builder[VectorServiceOptions] allowing the raw struct to be passed directly to methods that accept ...Builder[VectorServiceOptions].

func (*VectorServiceOptions) Validate
func (o *VectorServiceOptions) Validate() error

Validate implements Validator for VectorServiceOptions. Provider and ModelName must both be set or both be unset.

type WarningHandler

type WarningHandler func(w results.Warning)

WarningHandler is a callback function invoked for each warning in API responses. warnings indicate non-fatal conditions such as missing indexes or deprecated features.