Table of Contents

Method CreateAsync

Namespace
Qavren.Edge.Sqlite.Vec
Assembly
Qavren.Edge.Sqlite.dll

CreateAsync(SqliteConnection, string, int, VecMetric?, VecElementType, IEnumerable<VecAuxColumn>?, IEnumerable<VecMetadataColumn>?, IEnumerable<VecPartitionKey>?, int?, string, CancellationToken)

public static Task CreateAsync(SqliteConnection connection, string name, int dims, VecMetric? metric = VecMetric.Cosine, VecElementType elementType = VecElementType.Float32, IEnumerable<VecAuxColumn>? aux = null, IEnumerable<VecMetadataColumn>? metadata = null, IEnumerable<VecPartitionKey>? partitions = null, int? chunkSize = null, string vectorColumn = "embedding", CancellationToken cancellationToken = default)

Parameters

connection SqliteConnection

The open connection to create the table on.

name string

The table name.

dims int

The vector column's dimensionality (1 to 8192).

metric VecMetric?

The distance metric, or null for a Bit column, which rejects one.

elementType VecElementType

The vector column's element type.

aux IEnumerable<VecAuxColumn>

Auxiliary columns, selectable but never filterable in a KNN WHERE clause.

metadata IEnumerable<VecMetadataColumn>

Metadata columns, filterable with comparison operators.

partitions IEnumerable<VecPartitionKey>

Partition keys, pre-filtered with = constraints.

chunkSize int?

The chunk_size option; must be a positive multiple of 8 up to 4096, or null to leave it unset.

vectorColumn string

The vector column's name.

cancellationToken CancellationToken

Cancels the command.

Returns

Task

Exceptions

ArgumentException

name or vectorColumn is null, empty, or whitespace; or metric is set on a Bit column.

ArgumentOutOfRangeException

dims, chunkSize, or the size of aux, metadata or partitions is out of range.