-
-
Notifications
You must be signed in to change notification settings - Fork 450
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Starting WHERE clause parsing in the Linq overhaul
- Loading branch information
1 parent
9dbd095
commit afe3807
Showing
6 changed files
with
85 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Weasel.Postgresql; | ||
using Weasel.Postgresql.SqlGeneration; | ||
|
||
namespace Marten.Linq.New.Fragments; | ||
|
||
public record EqualsFragment(string Locator, object Value) : ISqlFragment | ||
{ | ||
public void Apply(CommandBuilder builder) | ||
{ | ||
builder.Append(Locator); | ||
builder.Append(" = "); | ||
builder.AppendParameter(Value); | ||
} | ||
|
||
public bool Contains(string sqlText) | ||
{ | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using System.Linq.Expressions; | ||
using Remotion.Linq.Clauses.Expressions; | ||
using Remotion.Linq.Parsing; | ||
using Weasel.Postgresql.SqlGeneration; | ||
|
||
namespace Marten.Linq.New; | ||
|
||
public class WhereClauseParser : RelinqExpressionVisitor | ||
{ | ||
private readonly IQueryableCollection _collection; | ||
private readonly IWhereFragmentHolder _holder; | ||
|
||
public WhereClauseParser(IQueryableCollection collection, IWhereFragmentHolder holder) | ||
{ | ||
_collection = collection; | ||
_holder = holder; | ||
} | ||
|
||
protected override Expression VisitNew(NewExpression expression) | ||
{ | ||
return base.VisitNew(expression); | ||
} | ||
|
||
protected override Expression VisitSubQuery(SubQueryExpression expression) | ||
{ | ||
return base.VisitSubQuery(expression); | ||
} | ||
|
||
protected override Expression VisitQuerySourceReference(QuerySourceReferenceExpression expression) | ||
{ | ||
return base.VisitQuerySourceReference(expression); | ||
} | ||
|
||
protected override Expression VisitBinary(BinaryExpression node) | ||
{ | ||
return base.VisitBinary(node); | ||
} | ||
|
||
protected override Expression VisitUnary(UnaryExpression node) | ||
{ | ||
return base.VisitUnary(node); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters