1 write to Collection
Microsoft.Extensions.VectorData.ConformanceTests (1)
Support\VectorStoreCollectionFixtureBase.cs (1)
42Collection = GetCollection();
50 references to Collection
Microsoft.Extensions.VectorData.ConformanceTests (50)
FilterTests.cs (3)
36string sqlInjection = $"foo; DROP TABLE {fixture.Collection.Name};"; 512var actual = await fixture.Collection.SearchAsync( 723=> TestStore.WaitForDataAsync(Collection, recordCount: TestData.Count, r => r.Int > 0);
HybridSearchTests.cs (4)
160=> (IKeywordHybridSearchable<VectorAndStringRecord<TKey>>)Collection; 206=> TestStore.WaitForDataAsync(Collection, recordCount: TestData.Count, vectorSize: 4); 214=> (IKeywordHybridSearchable<MultiTextStringRecord<TKey>>)Collection; 256=> TestStore.WaitForDataAsync(Collection, recordCount: TestData.Count, vectorSize: 4);
ModelTests\BasicModelTests.cs (1)
463protected VectorStoreCollection<TKey, Record> Collection => fixture.Collection;
ModelTests\DynamicModelTests.cs (19)
23var received = await fixture.Collection.GetAsync( 37var received = await fixture.Collection.GetAsync(ids, new() { IncludeVectors = includeVectors }).ToArrayAsync(); 58ArgumentNullException ex = await Assert.ThrowsAsync<ArgumentNullException>(() => fixture.Collection.GetAsync((TKey)default!)); 65ArgumentNullException ex = await Assert.ThrowsAsync<ArgumentNullException>(() => fixture.Collection.GetAsync(keys: null!).ToArrayAsync().AsTask()); 74Assert.Null(await fixture.Collection.GetAsync(key)); 80Assert.Empty(await fixture.Collection.GetAsync([]).ToArrayAsync()); 89var results = await fixture.Collection.GetAsync( 102var count = await fixture.Collection.GetAsync(r => true, top: 100).CountAsync(); 128var results = await fixture.Collection.GetAsync( 137results = await fixture.Collection.GetAsync( 167var results = await fixture.Collection.GetAsync( 176results = await fixture.Collection.GetAsync( 189var results = await fixture.Collection.GetAsync( 291Assert.NotNull(await fixture.Collection.GetAsync((TKey)recordToRemove[KeyPropertyName]!)); 292await fixture.Collection.DeleteAsync((TKey)recordToRemove[KeyPropertyName]!); 293Assert.Null(await fixture.Collection.GetAsync((TKey)recordToRemove[KeyPropertyName]!)); 301await fixture.Collection.DeleteAsync(key); 303Assert.Null(await fixture.Collection.GetAsync(key)); 386protected VectorStoreCollection<object, Dictionary<string, object?>> Collection => fixture.Collection;
ModelTests\MultiVectorModelTests.cs (2)
78protected VectorStoreCollection<TKey, MultiVectorRecord> Collection => fixture.Collection; 125=> TestStore.WaitForDataAsync(Collection, recordCount: TestData.Count, vectorProperty: r => r.Vector1);
ModelTests\NoDataModelTests.cs (1)
53protected VectorStoreCollection<TKey, NoDataRecord> Collection => fixture.Collection;
ModelTests\NoVectorModelTests.cs (2)
54protected VectorStoreCollection<TKey, NoVectorRecord> Collection => fixture.Collection; 89var results = await Collection.GetAsync([TestData[0].Key, TestData[1].Key]).ToArrayAsync();
Support\DynamicVectorStoreCollectionFixture.cs (2)
21await foreach (var record in Collection.GetAsync(r => true, top: BatchSize)) 24await Collection.DeleteAsync((TKey)record[KeyPropertyName]!);
Support\VectorStoreCollectionFixture.cs (2)
19keys = await Collection.GetAsync(r => true, top: BatchSize).Select(r => r.Key).ToArrayAsync(); 20await Collection.DeleteAsync(keys);
Support\VectorStoreCollectionFixtureBase.cs (5)
44if (await Collection.CollectionExistsAsync()) 46await Collection.EnsureCollectionDeletedAsync(); 49await Collection.EnsureCollectionExistsAsync(); 61await Collection.UpsertAsync(TestData); 67=> TestStore.WaitForDataAsync(Collection, recordCount: TestData.Count);
TypeTests\DataTypeTests.cs (9)
171await fixture.Collection.DeleteAsync([fixture.MainRecordKey, fixture.OtherRecordKey, fixture.NullRecordKey]); 172await fixture.TestStore.WaitForDataAsync(fixture.Collection, recordCount: 0); 178TRecord result = await fixture.Collection.GetAsync(fixture.MainRecordKey) ?? throw new InvalidOperationException($"Record with key '{fixture.MainRecordKey}' was not found."); 184await TestFiltering(fixture.Collection, property, mainValue, comparisonAction, instantiationExpressionBody); 192await fixture.Collection.EnsureCollectionDeletedAsync(); 196await fixture.Collection.DeleteAsync([fixture.MainRecordKey, fixture.OtherRecordKey, fixture.NullRecordKey]); 197await fixture.TestStore.WaitForDataAsync(fixture.Collection, recordCount: 0); 264await fixture.Collection.UpsertAsync(testData); 265await fixture.TestStore.WaitForDataAsync(fixture.Collection, recordCount: testData.Count);