WhereClause.startsWithAnyOfIgnoreCase()
Since v1.3.0
Syntax
table.where(indexOrPrimKey).startsWithAnyOfIgnoreCase(array) or
table.where(indexOrPrimKey).startsWithAnyOfIgnoreCase(str1, str2, strN, ...)
Parameters
| indexOrPrimKey: String | Name of an index or primary key registered in Version.stores() |
| array | Array of prefixes (strings) to look for |
| str1, str2, strN | Prefixes (strings) to look for |
Return Value
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: "Fool",
lastName: "Barfly"
},{
firstName: "Bart",
lastName: "Foofie"
}]).then(()=>{
// Query values
db.friends.where('lastName').startsWithAnyOfIgnoreCase(['foo','bar'])
.toArray(function(result) {
console.log("Found: " + result.lastName);
});
});