Table of Contents

Method AddVectorCollectionMigration

Namespace
Qavren.Edge.VectorData
Assembly
Qavren.Edge.VectorData.dll

AddVectorCollectionMigration<TKey, TRecord>(EdgeBuilder, int, string, string?, Action<EdgeVectorStoreCollectionOptions>?)

RECOMMENDED. Emits the collection DDL as a sub-project 1 IEdgeMigration, so the schema is versioned by the existing migrator at startup order 100 with PRAGMA user_version bookkeeping instead of appearing on first use.

[RequiresDynamicCode("Reflects over TRecord. Use the VectorStoreCollectionDefinition overload in trimmed or AOT apps.")]
[RequiresUnreferencedCode("Reflects over TRecord. Use the VectorStoreCollectionDefinition overload in trimmed or AOT apps.")]
public static EdgeBuilder AddVectorCollectionMigration<TKey, TRecord>(this EdgeBuilder builder, int version, string collectionName, string? databaseName = null, Action<EdgeVectorStoreCollectionOptions>? configure = null) where TKey : notnull where TRecord : class

Parameters

builder EdgeBuilder

The Qavren.Edge builder.

version int

The migration version, unique and ascending across the database.

collectionName string

The collection name; the data table is named after it verbatim.

databaseName string

The sub-project 1 database name. Null is the unnamed database.

configure Action<EdgeVectorStoreCollectionOptions>

Configures the per-collection overrides.

Returns

EdgeBuilder

The builder, for chaining.

Type Parameters

TKey

The key type.

TRecord

The record type.

AddVectorCollectionMigration(EdgeBuilder, int, string, VectorStoreCollectionDefinition, string?, Action<EdgeVectorStoreCollectionOptions>?)

The trim/AOT-safe variant: the model is built from the definition with CollectionModelBuilder.BuildDynamic, which reflects over nothing.

public static EdgeBuilder AddVectorCollectionMigration(this EdgeBuilder builder, int version, string collectionName, VectorStoreCollectionDefinition definition, string? databaseName = null, Action<EdgeVectorStoreCollectionOptions>? configure = null)

Parameters

builder EdgeBuilder

The Qavren.Edge builder.

version int

The migration version, unique and ascending across the database.

collectionName string

The collection name.

definition VectorStoreCollectionDefinition

The record shape.

databaseName string

The sub-project 1 database name. Null is the unnamed database.

configure Action<EdgeVectorStoreCollectionOptions>

Configures the per-collection overrides.

Returns

EdgeBuilder

The builder, for chaining.