File tree Expand file tree Collapse file tree 8 files changed +24
-18
lines changed Expand file tree Collapse file tree 8 files changed +24
-18
lines changed Original file line number Diff line number Diff line change @@ -171,8 +171,8 @@ public async Task SubQueryAsync()
171
171
[ Test ]
172
172
public async Task ThreeLevelSubqueryAsync ( )
173
173
{
174
- if ( ! Dialect . SupportsScalarSubSelects )
175
- Assert . Ignore ( "Dialect does not support scalar sub-select" ) ;
174
+ if ( ! TestDialect . SupportsSubSelectsInOrderBy )
175
+ Assert . Ignore ( "Dialect does not support order by sub-select" ) ;
176
176
177
177
Person p = null ;
178
178
var detachedCriteria2 = DetachedCriteria . For < Person > ( "vf_inner_2" )
Original file line number Diff line number Diff line change @@ -524,10 +524,10 @@ public async Task OrdersWithSubquery9SumAsync()
524
524
[ Test ( Description = "GH2479" ) ]
525
525
public async Task OrdersWithSubquery11Async ( )
526
526
{
527
- if ( Dialect is MySQLDialect )
528
- Assert . Ignore ( "MySQL does not support LIMIT in subqueries. " ) ;
529
- if ( Dialect is MsSqlCeDialect )
530
- Assert . Ignore ( "MS SQL CE does not support sorting on a subquery. " ) ;
527
+ if ( ! TestDialect . SupportsSubSelectsInOrderBy )
528
+ Assert . Ignore ( "Dialect does not support order by sub-select " ) ;
529
+ if ( ! TestDialect . SupportsOrderByAndLimitInSubQueries )
530
+ Assert . Ignore ( "Dialect does not support sub-selects with order by or limit/top " ) ;
531
531
532
532
var ordersQuery = db . Orders
533
533
. OrderByDescending ( x => x . OrderLines . Count ) . ThenBy ( x => x . OrderId )
Original file line number Diff line number Diff line change @@ -148,8 +148,8 @@ public async Task AggregatingHirearchyWithCountAsync()
148
148
[ Test ]
149
149
public async Task LimitingResultSetOnQueryThatIsOrderedByProjectionAsync ( )
150
150
{
151
- if ( ! Dialect . SupportsScalarSubSelects )
152
- Assert . Ignore ( "Dialect does not support scalar sub-select" ) ;
151
+ if ( ! TestDialect . SupportsSubSelectsInOrderBy )
152
+ Assert . Ignore ( "Dialect does not support order by sub-select" ) ;
153
153
154
154
using ( var s = OpenSession ( ) )
155
155
{
Original file line number Diff line number Diff line change @@ -160,8 +160,8 @@ public void SubQuery()
160
160
[ Test ]
161
161
public void ThreeLevelSubquery ( )
162
162
{
163
- if ( ! Dialect . SupportsScalarSubSelects )
164
- Assert . Ignore ( "Dialect does not support scalar sub-select" ) ;
163
+ if ( ! TestDialect . SupportsSubSelectsInOrderBy )
164
+ Assert . Ignore ( "Dialect does not support order by sub-select" ) ;
165
165
166
166
Person p = null ;
167
167
var detachedCriteria2 = DetachedCriteria . For < Person > ( "vf_inner_2" )
Original file line number Diff line number Diff line change @@ -655,10 +655,10 @@ public void OrdersWithSubquery10A()
655
655
[ Test ( Description = "GH2479" ) ]
656
656
public void OrdersWithSubquery11 ( )
657
657
{
658
- if ( Dialect is MySQLDialect )
659
- Assert . Ignore ( "MySQL does not support LIMIT in subqueries. " ) ;
660
- if ( Dialect is MsSqlCeDialect )
661
- Assert . Ignore ( "MS SQL CE does not support sorting on a subquery. " ) ;
658
+ if ( ! TestDialect . SupportsSubSelectsInOrderBy )
659
+ Assert . Ignore ( "Dialect does not support order by sub-select " ) ;
660
+ if ( ! TestDialect . SupportsOrderByAndLimitInSubQueries )
661
+ Assert . Ignore ( "Dialect does not support sub-selects with order by or limit/top " ) ;
662
662
663
663
var ordersQuery = db . Orders
664
664
. OrderByDescending ( x => x . OrderLines . Count ) . ThenBy ( x => x . OrderId )
Original file line number Diff line number Diff line change @@ -137,8 +137,8 @@ public void AggregatingHirearchyWithCount()
137
137
[ Test ]
138
138
public void LimitingResultSetOnQueryThatIsOrderedByProjection ( )
139
139
{
140
- if ( ! Dialect . SupportsScalarSubSelects )
141
- Assert . Ignore ( "Dialect does not support scalar sub-select" ) ;
140
+ if ( ! TestDialect . SupportsSubSelectsInOrderBy )
141
+ Assert . Ignore ( "Dialect does not support order by sub-select" ) ;
142
142
143
143
using ( var s = OpenSession ( ) )
144
144
{
Original file line number Diff line number Diff line change @@ -120,10 +120,15 @@ public bool SupportsSqlType(SqlType sqlType)
120
120
/// </summary>
121
121
public virtual bool SupportsModuloOnDecimal => true ;
122
122
123
+ /// <summary>
124
+ /// Supports sub-selects in order by clause
125
+ /// </summary>
126
+ public virtual bool SupportsSubSelectsInOrderBy => _dialect . SupportsScalarSubSelects ;
127
+
123
128
/// <summary>
124
129
/// Supports aggregating sub-selects in order by clause
125
130
/// </summary>
126
- public virtual bool SupportsAggregatingScalarSubSelectsInOrderBy => _dialect . SupportsScalarSubSelects ;
131
+ public virtual bool SupportsAggregatingScalarSubSelectsInOrderBy => SupportsSubSelectsInOrderBy ;
127
132
128
133
/// <summary>
129
134
/// Supports order by and limits/top in correlated sub-queries
Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ public DB2TestDialect(Dialect.Dialect dialect) : base(dialect)
6
6
{
7
7
}
8
8
9
- public override bool SupportsNonDataBoundCondition => false ;
10
9
public override bool SupportsComplexExpressionInGroupBy => false ;
10
+ public override bool SupportsNonDataBoundCondition => false ;
11
+ public override bool SupportsSubSelectsInOrderBy = false ;
11
12
}
12
13
}
You can’t perform that action at this time.
0 commit comments