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