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
builderEdgeBuilderThe Qavren.Edge builder.
versionintThe migration version, unique and ascending across the database.
collectionNamestringThe collection name; the data table is named after it verbatim.
databaseNamestringThe sub-project 1 database name. Null is the unnamed database.
configureAction<EdgeVectorStoreCollectionOptions>Configures the per-collection overrides.
Returns
- EdgeBuilder
The builder, for chaining.
Type Parameters
TKeyThe key type.
TRecordThe 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
builderEdgeBuilderThe Qavren.Edge builder.
versionintThe migration version, unique and ascending across the database.
collectionNamestringThe collection name.
definitionVectorStoreCollectionDefinitionThe record shape.
databaseNamestringThe sub-project 1 database name. Null is the unnamed database.
configureAction<EdgeVectorStoreCollectionOptions>Configures the per-collection overrides.
Returns
- EdgeBuilder
The builder, for chaining.