0
|
1 using System;
|
|
2 using System.Linq.Expressions;
|
|
3
|
|
4 #if DEBUG
|
|
5 #pragma warning disable 3010
|
|
6 #endif
|
|
7
|
|
8 namespace BLToolkit.Data.Linq.Builder
|
|
9 {
|
|
10 using Data.Sql;
|
|
11
|
|
12 public interface IBuildContext
|
|
13 {
|
|
14 #if DEBUG
|
|
15 // ReSharper disable InconsistentNaming
|
|
16 [CLSCompliant(false)]
|
|
17 string _sqlQueryText { get; }
|
|
18 // ReSharper restore InconsistentNaming
|
|
19 #endif
|
|
20
|
|
21 ExpressionBuilder Builder { get; }
|
|
22 Expression Expression { get; }
|
|
23 SqlQuery SqlQuery { get; set; }
|
|
24 IBuildContext Parent { get; set; }
|
|
25
|
|
26 void BuildQuery<T> (Query<T> query, ParameterExpression queryParameter);
|
|
27 Expression BuildExpression (Expression expression, int level);
|
|
28 SqlInfo[] ConvertToSql (Expression expression, int level, ConvertFlags flags);
|
|
29 SqlInfo[] ConvertToIndex (Expression expression, int level, ConvertFlags flags);
|
|
30 IsExpressionResult IsExpression (Expression expression, int level, RequestFor requestFlag);
|
|
31 IBuildContext GetContext (Expression expression, int level, BuildInfo buildInfo);
|
|
32 int ConvertToParentIndex(int index, IBuildContext context);
|
|
33 void SetAlias (string alias);
|
|
34 ISqlExpression GetSubQuery (IBuildContext context);
|
|
35 }
|
|
36 }
|