1 override of GetAsync
Microsoft.Extensions.VectorData.ConformanceTests (1)
DependencyInjectionTests.cs (1)
293
public override Task<TRecord?>
GetAsync
(TKey key, RecordRetrievalOptions? options = null, CancellationToken cancellationToken = default)
40 references to GetAsync
Microsoft.Extensions.VectorData.Abstractions (2)
RecordRetrievalOptions.cs (1)
10
/// Defines options for calling <see cref="VectorStoreCollection{TKey, TRecord}.
GetAsync
(TKey, RecordRetrievalOptions?, CancellationToken)"/>
VectorStoreCollection.cs (1)
91
var record = await
GetAsync
(key, options, cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.VectorData.ConformanceTests (38)
EmbeddingGenerationTests.cs (1)
322
var exception = await Assert.ThrowsAsync<NotSupportedException>(() => collection.
GetAsync
(stringVectorFixture.TestData[0].Key, new() { IncludeVectors = true }));
ModelTests\BasicModelTests.cs (8)
21
var received = await Collection.
GetAsync
(expectedRecord.Key, new() { IncludeVectors = includeVectors });
53
ArgumentNullException ex = await Assert.ThrowsAsync<ArgumentNullException>(() => Collection.
GetAsync
((TKey)default!));
69
Assert.Null(await Collection.
GetAsync
(key));
219
Assert.Null(await Collection.
GetAsync
(expectedKey));
222
var received = await Collection.
GetAsync
(expectedKey, new() { IncludeVectors = true });
240
Assert.NotNull(await Collection.
GetAsync
(existingRecord.Key));
243
var received = await Collection.
GetAsync
(existingRecord.Key, new() { IncludeVectors = true });
374
Assert.Null(await Collection.
GetAsync
(keyToRemove));
ModelTests\DynamicModelTests.cs (10)
23
var received = await fixture.Collection.
GetAsync
(
58
ArgumentNullException ex = await Assert.ThrowsAsync<ArgumentNullException>(() => fixture.Collection.
GetAsync
((TKey)default!));
74
Assert.Null(await fixture.Collection.
GetAsync
(key));
222
Assert.Null(await Collection.
GetAsync
(expectedKey));
225
var received = await Collection.
GetAsync
(expectedKey, new() { IncludeVectors = true });
241
Assert.NotNull(await Collection.
GetAsync
((TKey)existingRecord[KeyPropertyName]!));
244
var received = await Collection.
GetAsync
((TKey)existingRecord[KeyPropertyName]!, new() { IncludeVectors = true });
291
Assert.NotNull(await fixture.Collection.
GetAsync
((TKey)recordToRemove[KeyPropertyName]!));
293
Assert.Null(await fixture.Collection.
GetAsync
((TKey)recordToRemove[KeyPropertyName]!));
303
Assert.Null(await fixture.Collection.
GetAsync
(key));
ModelTests\MultiVectorModelTests.cs (4)
22
var received = await Collection.
GetAsync
(expectedRecord.Key, new() { IncludeVectors = includeVectors });
39
Assert.Null(await Collection.
GetAsync
(expectedKey));
42
var received = await Collection.
GetAsync
(expectedKey, new() { IncludeVectors = true });
52
Assert.Null(await Collection.
GetAsync
(keyToRemove));
ModelTests\NoDataModelTests.cs (4)
22
var received = await Collection.
GetAsync
(expectedRecord.Key, new() { IncludeVectors = includeVectors });
37
Assert.Null(await Collection.
GetAsync
(expectedKey));
40
var received = await Collection.
GetAsync
(expectedKey, new() { IncludeVectors = true });
50
Assert.Null(await Collection.
GetAsync
(keyToRemove));
ModelTests\NoVectorModelTests.cs (4)
23
var received = await Collection.
GetAsync
(expectedRecord.Key, new() { IncludeVectors = includeVectors });
38
Assert.Null(await Collection.
GetAsync
(expectedKey));
41
var received = await Collection.
GetAsync
(expectedKey, new() { IncludeVectors = true });
51
Assert.Null(await Collection.
GetAsync
(keyToRemove));
TypeTests\DataTypeTests.cs (2)
178
TRecord result = await fixture.Collection.
GetAsync
(fixture.MainRecordKey) ?? throw new InvalidOperationException($"Record with key '{fixture.MainRecordKey}' was not found.");
211
var dynamicResult = await dynamicCollection.
GetAsync
(fixture.MainRecordKey) ?? throw new InvalidOperationException($"Record with key '{fixture.MainRecordKey}' was not found.");
TypeTests\EmbeddingTypeTests.cs (3)
68
var result1 = await collection.
GetAsync
(key, new() { IncludeVectors = true });
115
var dynamicResult1 = await dynamicCollection.
GetAsync
(key, new() { IncludeVectors = true });
164
var result3 = await collection2.
GetAsync
(key);
TypeTests\KeyTypeTests.cs (2)
78
var result = await collection.
GetAsync
(key1);
125
var dynamicResult = await dynamicCollection.
GetAsync
(key1);