public static void DropIndexes(this LiteCollection <BusinessCard> collection)
 {
     collection.DropIndex(nameof(BusinessCard.Id));
     collection.DropIndex(nameof(BusinessCard.FirstName));
     collection.DropIndex(nameof(BusinessCard.LastName));
     collection.DropIndex(nameof(BusinessCard.BirthDay));
 }
Example #2
0
        public void FilterAndSortAscendingWithoutIndex()
        {
            _collection.DropIndex("idx_value");

            var result = _collection.Query()
                         .Where(x => x.Value == "Value 1")
                         .OrderBy(x => x.Id, Query.Ascending)
                         .ToList();

            result[0].Id.Should().Be("B");
            result[1].Id.Should().Be("C");
        }
 public bool DropIndex(string field)
 {
     return(_collection.DropIndex(field));
 }
Example #4
0
 public bool DropIndex(string name)
 {
     DLiteUtil.Whisper(Name, "DropIndex", new object[] { name });
     return(LiteCollection.DropIndex(name));
 }