Skip to content

Commit

Permalink
modify the var name
Browse files Browse the repository at this point in the history
  • Loading branch information
Lovecxgood committed Jun 6, 2019
1 parent 92c71e3 commit 688e88d
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 38 deletions.
6 changes: 3 additions & 3 deletions LiteDB/Engine/Query/QueryAll.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ internal override bool FilterDocument(BsonDocument doc)

public override BsonValue ToMongoQuery()
{
BsonDocument all = new BsonDocument();
all.Add("$query", new BsonDocument());
BsonDocument mq = new BsonDocument();
mq.Add("$query", new BsonDocument());
//BsonDocument order = new BsonDocument();
//order.Add(this.Field, _order);
//all.Add("$orderby", order);
return all;
return mq;
}

public override string ToString()
Expand Down
6 changes: 3 additions & 3 deletions LiteDB/Engine/Query/QueryAnd.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ public override BsonValue ToMongoQuery()
BsonArray array = new BsonArray();
array.Add(_left.ToMongoQuery());
array.Add(_right.ToMongoQuery());
BsonDocument and = new BsonDocument();
and.Add("$and", array);
return and;
BsonDocument mq = new BsonDocument();
mq.Add("$and", array);
return mq;
}

public override string ToString()
Expand Down
8 changes: 3 additions & 5 deletions LiteDB/Engine/Query/QueryBetween.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,10 @@ public override BsonValue ToMongoQuery()
string o2 = _endEquals ? "$lte" : "$lt";
BsonDocument opt = new BsonDocument();
opt.Add(o1, _start);
//BsonDocument opt2 = new BsonDocument();
opt.Add(o2, _end);
BsonDocument btw = new BsonDocument();
btw.Add(this.Field, opt);
//btw.Add(this.Field, opt2);
return btw;
BsonDocument mq = new BsonDocument();
mq.Add(this.Field, opt);
return mq;
}

public override string ToString()
Expand Down
6 changes: 3 additions & 3 deletions LiteDB/Engine/Query/QueryContains.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public override BsonValue ToMongoQuery()
{
BsonDocument opt = new BsonDocument();
opt.Add("$regex", _value);
BsonDocument contains = new BsonDocument();
contains.Add(this.Field, opt);
return contains;
BsonDocument mq = new BsonDocument();
mq.Add(this.Field, opt);
return mq;
}

public override string ToString()
Expand Down
6 changes: 3 additions & 3 deletions LiteDB/Engine/Query/QueryEquals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public override BsonValue ToMongoQuery()
{
BsonDocument opt = new BsonDocument();
opt.Add("$eq", _value);
BsonDocument equal = new BsonDocument();
equal.Add(this.Field, opt);
return equal;
BsonDocument mq = new BsonDocument();
mq.Add(this.Field, opt);
return mq;
}

public override string ToString()
Expand Down
6 changes: 3 additions & 3 deletions LiteDB/Engine/Query/QueryGreater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ public override BsonValue ToMongoQuery()
string o = _equals ? "$gte" : "$gt";
BsonDocument opt = new BsonDocument();
opt.Add(o, _value);
BsonDocument greater = new BsonDocument();
greater.Add(this.Field, opt);
return greater;
BsonDocument mq = new BsonDocument();
mq.Add(this.Field, opt);
return mq;
}

public override string ToString()
Expand Down
6 changes: 3 additions & 3 deletions LiteDB/Engine/Query/QueryIn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public override BsonValue ToMongoQuery()
}
BsonDocument opt = new BsonDocument();
opt.Add("$in", array);
BsonDocument in_ = new BsonDocument();
in_.Add(this.Field, opt);
return in_;
BsonDocument mq = new BsonDocument();
mq.Add(this.Field, opt);
return mq;
}

public override string ToString()
Expand Down
6 changes: 3 additions & 3 deletions LiteDB/Engine/Query/QueryLess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public override BsonValue ToMongoQuery()
string o = _equals ? "$lte" : "$lt";
BsonDocument opt = new BsonDocument();
opt.Add(o, _value);
BsonDocument less = new BsonDocument();
less.Add(this.Field, opt);
return less;
BsonDocument mq = new BsonDocument();
mq.Add(this.Field, opt);
return mq;
}

public override string ToString()
Expand Down
6 changes: 3 additions & 3 deletions LiteDB/Engine/Query/QueryNot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ public override BsonValue ToMongoQuery()
{
BsonDocument opt = new BsonDocument();
opt.Add("$not", _query.ToMongoQuery());
BsonDocument not = new BsonDocument();
not.Add(this.Field, opt);
return not;
BsonDocument mq = new BsonDocument();
mq.Add(this.Field, opt);
return mq;
}

public override string ToString()
Expand Down
6 changes: 3 additions & 3 deletions LiteDB/Engine/Query/QueryNotEquals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public override BsonValue ToMongoQuery()
{
BsonDocument opt = new BsonDocument();
opt.Add("$ne", _value);
BsonDocument notequal = new BsonDocument();
notequal.Add(this.Field, opt);
return notequal;
BsonDocument mq = new BsonDocument();
mq.Add(this.Field, opt);
return mq;
}

public override string ToString()
Expand Down
6 changes: 3 additions & 3 deletions LiteDB/Engine/Query/QueryOr.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public override BsonValue ToMongoQuery()
BsonArray array = new BsonArray();
array.Add(_left.ToMongoQuery());
array.Add(_right.ToMongoQuery());
BsonDocument or = new BsonDocument();
or.Add("$or", array);
return or;
BsonDocument mq = new BsonDocument();
mq.Add("$or", array);
return mq;
}

public override string ToString()
Expand Down
6 changes: 3 additions & 3 deletions LiteDB/Engine/Query/QueryStartsWith.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public override BsonValue ToMongoQuery()
{
BsonDocument opt = new BsonDocument();
opt.Add("$regex", "^" + _value);
BsonDocument startwith = new BsonDocument();
startwith.Add(this.Field, opt);
return startwith;
BsonDocument mq = new BsonDocument();
mq.Add(this.Field, opt);
return mq;
}

public override string ToString()
Expand Down

0 comments on commit 688e88d

Please sign in to comment.