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"}));

EQ

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"));

GT

Matches values that are greater than the value specified in the query.

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

GTE

Matches values that are greater than or equal to the value specified in the query.

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

In

An array of possible values can be supplied, a collection will be returned if any of the supplied values is matched

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

LT

Matches values that are less than the value specified in the query.

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

LTE

Matches values that are less than or equal to the value specified in the query.

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

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