@@ -21,7 +21,7 @@ public SqlExpression<T> Join<Target>(Expression<Func<T, Target, bool>> joinExpr
21
21
return InternalJoin ( "INNER JOIN" , joinExpr ) ;
22
22
}
23
23
24
- public SqlExpression < T > Join < Target > ( Expression < Func < T , Target , bool > > joinExpr , string joinFormat )
24
+ public SqlExpression < T > Join < Target > ( Expression < Func < T , Target , bool > > joinExpr , JoinFormatDelegate joinFormat )
25
25
{
26
26
if ( joinFormat == null )
27
27
throw new ArgumentNullException ( "joinFormat" ) ;
@@ -34,7 +34,7 @@ public SqlExpression<T> Join<Source, Target>(Expression<Func<Source, Target, boo
34
34
return InternalJoin ( "INNER JOIN" , joinExpr ) ;
35
35
}
36
36
37
- public SqlExpression < T > Join < Source , Target > ( Expression < Func < Source , Target , bool > > joinExpr , string joinFormat )
37
+ public SqlExpression < T > Join < Source , Target > ( Expression < Func < Source , Target , bool > > joinExpr , JoinFormatDelegate joinFormat )
38
38
{
39
39
return InternalJoin ( "INNER JOIN" , joinExpr , joinFormat ) ;
40
40
}
@@ -49,7 +49,7 @@ public SqlExpression<T> LeftJoin<Target>(Expression<Func<T, Target, bool>> joinE
49
49
return InternalJoin ( "LEFT JOIN" , joinExpr ) ;
50
50
}
51
51
52
- public SqlExpression < T > LeftJoin < Target > ( Expression < Func < T , Target , bool > > joinExpr , string joinFormat )
52
+ public SqlExpression < T > LeftJoin < Target > ( Expression < Func < T , Target , bool > > joinExpr , JoinFormatDelegate joinFormat )
53
53
{
54
54
if ( joinFormat == null )
55
55
throw new ArgumentNullException ( "joinFormat" ) ;
@@ -62,7 +62,7 @@ public SqlExpression<T> LeftJoin<Source, Target>(Expression<Func<Source, Target,
62
62
return InternalJoin ( "LEFT JOIN" , joinExpr ) ;
63
63
}
64
64
65
- public SqlExpression < T > LeftJoin < Source , Target > ( Expression < Func < Source , Target , bool > > joinExpr , string joinFormat )
65
+ public SqlExpression < T > LeftJoin < Source , Target > ( Expression < Func < Source , Target , bool > > joinExpr , JoinFormatDelegate joinFormat )
66
66
{
67
67
return InternalJoin ( "LEFT JOIN" , joinExpr , joinFormat ) ;
68
68
}
@@ -77,7 +77,7 @@ public SqlExpression<T> RightJoin<Target>(Expression<Func<T, Target, bool>> join
77
77
return InternalJoin ( "RIGHT JOIN" , joinExpr ) ;
78
78
}
79
79
80
- public SqlExpression < T > RightJoin < Target > ( Expression < Func < T , Target , bool > > joinExpr , string joinFormat )
80
+ public SqlExpression < T > RightJoin < Target > ( Expression < Func < T , Target , bool > > joinExpr , JoinFormatDelegate joinFormat )
81
81
{
82
82
if ( joinFormat == null )
83
83
throw new ArgumentNullException ( "joinFormat" ) ;
@@ -90,7 +90,7 @@ public SqlExpression<T> RightJoin<Source, Target>(Expression<Func<Source, Target
90
90
return InternalJoin ( "RIGHT JOIN" , joinExpr ) ;
91
91
}
92
92
93
- public SqlExpression < T > RightJoin < Source , Target > ( Expression < Func < Source , Target , bool > > joinExpr , string joinFormat )
93
+ public SqlExpression < T > RightJoin < Source , Target > ( Expression < Func < Source , Target , bool > > joinExpr , JoinFormatDelegate joinFormat )
94
94
{
95
95
return InternalJoin ( "RIGHT JOIN" , joinExpr , joinFormat ) ;
96
96
}
@@ -115,7 +115,7 @@ public SqlExpression<T> CrossJoin<Source, Target>(Expression<Func<Source, Target
115
115
return InternalJoin ( "CROSS JOIN" , joinExpr ) ;
116
116
}
117
117
118
- protected SqlExpression < T > InternalJoin < Source , Target > ( string joinType , Expression < Func < Source , Target , bool > > joinExpr , string joinFormat = null )
118
+ protected SqlExpression < T > InternalJoin < Source , Target > ( string joinType , Expression < Func < Source , Target , bool > > joinExpr , JoinFormatDelegate joinFormat = null )
119
119
{
120
120
var sourceDef = typeof ( Source ) . GetModelDefinition ( ) ;
121
121
var targetDef = typeof ( Target ) . GetModelDefinition ( ) ;
@@ -164,7 +164,7 @@ public SqlExpression<T> CustomJoin(string joinString)
164
164
return this ;
165
165
}
166
166
167
- private SqlExpression < T > InternalJoin ( string joinType , Expression joinExpr , ModelDefinition sourceDef , ModelDefinition targetDef , string joinFormat = null )
167
+ private SqlExpression < T > InternalJoin ( string joinType , Expression joinExpr , ModelDefinition sourceDef , ModelDefinition targetDef , JoinFormatDelegate joinFormat = null )
168
168
{
169
169
PrefixFieldWithTableName = true ;
170
170
@@ -188,7 +188,7 @@ private SqlExpression<T> InternalJoin(string joinType, Expression joinExpr, Mode
188
188
: targetDef ;
189
189
190
190
FromExpression += joinFormat != null
191
- ? " {0} {1}" . Fmt ( joinType , string . Format ( joinFormat , SqlTable ( joinDef ) , sqlExpr ) )
191
+ ? " {0} {1}" . Fmt ( joinType , joinFormat ( SqlTable ( joinDef ) , sqlExpr ) )
192
192
: " {0} {1} {2}" . Fmt ( joinType , SqlTable ( joinDef ) , sqlExpr ) ;
193
193
194
194
return this ;
0 commit comments