Skip to content

Conversation

VectorTetra
Copy link
Contributor

No description provided.

Comment on lines +276 to +281
if options.Optimize then
let body = ExpressionOptimizer.visit(buildFilterExpr (SourceExpression param) buildTypeDiscriminatorCheck filter)
whereExpr<'T> query param body
else
let body = buildFilterExpr (SourceExpression param) buildTypeDiscriminatorCheck filter
whereExpr<'T> query param body
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if options.Optimize then
let body = ExpressionOptimizer.visit(buildFilterExpr (SourceExpression param) buildTypeDiscriminatorCheck filter)
whereExpr<'T> query param body
else
let body = buildFilterExpr (SourceExpression param) buildTypeDiscriminatorCheck filter
whereExpr<'T> query param body
if options.Optimize then
buildFilterExpr (SourceExpression param) buildTypeDiscriminatorCheck filter
|> ExpressionOptimizer.visit
else
buildFilterExpr (SourceExpression param) buildTypeDiscriminatorCheck filter
|> whereExpr<'T> query param

||| (("firstName" @=@ "a")
||| ("lastName" @=@ "a"))))))
let queryable = data.AsQueryable ()
let filteredData = queryable.Apply (filter, ObjectListFilterLinqOptions(optimize = true)) |> Seq.toList
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let filteredData = queryable.Apply (filter, ObjectListFilterLinqOptions(optimize = true)) |> Seq.toList
let filteredData = queryable.Apply (filter, ObjectListFilterLinqOptions (optimize = true)) |> Seq.toList

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants