Skip to content

Commit

Permalink
Added helper method to create find-expr with limit
Browse files Browse the repository at this point in the history
  • Loading branch information
b0wter committed Nov 26, 2019
1 parent 961d668 commit c2f9058
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/Mango.fs
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,7 @@ module Mango =
*)
}

/// <summary>
/// Creates an <see cref="Expression"/> with default settings for all fields but the selector.
/// </summary>
let createExpression (operator: Operator) =
{
selector = operator
Expand All @@ -165,6 +163,10 @@ module Mango =
stable = None
execution_stats = None
}

let createExpressionWithLimit (operator: Operator) (limit: int) =
{ selector = operator; limit = Some limit; skip = None; sort = None; use_index = None;
r = 1; bookmark = None ; update = None; stable = None; execution_stats = None }

let conditionWithParents parents field operation =
Conditional {
Expand Down

0 comments on commit c2f9058

Please sign in to comment.