VectorStoreKeyAttribute class final
Marks a property on a record as the key field in a vector store collection.
Exactly one property per record class must be annotated with VectorStoreKeyAttribute.
Example:
class Hotel {
@VectorStoreKeyAttribute()
final String hotelId;
Hotel({required this.hotelId});
}
Since Dart has no built-in runtime reflection, annotations are intended for use with code generators or explicit VectorStoreCollectionDefinition construction.
- Annotations
-
- @Source(name: 'VectorStoreKeyAttribute.cs', namespace: 'Microsoft.Extensions.VectorData', repository: 'dotnet/extensions', path: 'src/Libraries/Microsoft.Extensions.VectorData.Abstractions/VectorData/Attributes/')
Constructors
- VectorStoreKeyAttribute({String? storageName, bool? isAutoGenerated})
-
Creates a VectorStoreKeyAttribute.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAutoGenerated → bool?
-
Whether the key is automatically generated by the vector store.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- storageName → String?
-
The name used when storing this property in the vector store.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited