[CSHARP-54] Support for querying using JS functions in $where clause Created: 25/Jul/10 Updated: 29/Oct/10 Resolved: 29/Oct/10 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | SAMUS |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Pen Fold | Assignee: | Sam Corder |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Can support for the following MongoDB feature be added: db.myCollection.find( { active: true, $where: function() { return obj.credits - obj.debits < 0; }} ); |
| Comments |
| Comment by Pen Fold [ 25/Jul/10 ] |
|
Great, I missed that. |
| Comment by Steve Wagner [ 25/Jul/10 ] |
|
That is already supported. First you have still the option to create that directly as Document. myCollection.Find(new Document("active",true).Add("$where",new Code("return obj.credits - obj.debits < 0;")); Second we have the Op.Where("return obj.credits - obj.debits < 0;") operator for that. |