WhereClause.startsWithAnyOfIgnoreCase()

Since v1.3.0

Syntax

table.where(indexOrPrimKey).startsWithAnyOfIgnoreCase(array) or
table.where(indexOrPrimKey).startsWithAnyOfIgnoreCase(str1, str2, strN, ...)

Parameters

indexOrPrimKey: StringName of an index or primary key registered in Version.stores()
arrayArray of prefixes (strings) to look for
str1, str2, strNPrefixes (strings) to look for

Return Value

Collection

Remarks

Searches given index for given prefixes, ignoring case differences.

Sample

// Define DB
var db = new Dexie("friendsDB");
db.version(1).stores({
    friends: '++id,fistName,lastName'
});

// Add some values
db.friends.bulkAdd([{
    firstName: "Foo",
    lastName: "Barfly"
},{
    firstName: "Bart",
    lastName: "Foofie"
}]);

// Query values
db.friends.where('lastName').startsWithAnyOfIgnoreCase(['foo','bar'])
  .toArray(function(result) {
      console.log("Found: " + result.lastName);
  });

Table of Contents