Skip to content
donnyv edited this page Sep 1, 2013 · 9 revisions

Comparison

All

Assumes the object property is an array and only returns collections where all supplied values are matched.

var db = new enosql.EnosqlDatabase(@"c:\temp\db.jdb");
var PeopleCollection = db.GetCollection<People>();
PeopleCollection.Find(EnosqlQuery.All("FirstName", new []{"tom", "jim", "donny"}));

Equal

Performs a strict equality test using ===.

var db = new enosql.EnosqlDatabase(@"c:\temp\db.jdb");
var PeopleCollection = db.GetCollection<People>();
PeopleCollection.Find(EnosqlQuery.EQ("FirstName", "Donny"));

Logical

And

Joins query clauses with a logical AND returns all documents that match the conditions of both clauses

var db = new enosql.EnosqlDatabase(@"c:\temp\db.jdb");
var PeopleCollection = db.GetCollection<People>();
PeopleCollection.Find(EnosqlQuery.And(
  EnosqlQuery.EQ("FirstName", "Donny"),
  EnosqlQuery.LikeI("LastName", "smi")
);
Clone this wiki locally