optimze mongodb query default limit=10
This commit is contained in:
parent
f6e9f4689b
commit
bce3e1cf11
|
|
@ -154,7 +154,13 @@ public class SqlSelect : IFunctionCallback
|
|||
// Apply limit
|
||||
var limitMatch = Regex.Match(chainedOps, @"\.limit\s*\((\d+)\)");
|
||||
if (limitMatch.Success && int.TryParse(limitMatch.Groups[1].Value, out var limit))
|
||||
{
|
||||
findFluent = findFluent.Limit(limit);
|
||||
}
|
||||
else
|
||||
{
|
||||
findFluent = findFluent.Limit(10);
|
||||
}
|
||||
|
||||
return findFluent;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue