File tree Expand file tree Collapse file tree
Orm/Xtensive.Orm.Firebird/Sql.Drivers.Firebird/v4_0 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- using System ;
2- using System . Collections . Generic ;
3- using System . Text ;
1+ // Copyright (C) 2021 Xtensive LLC.
2+ // This code is distributed under MIT license terms.
3+ // See the License.txt file in the project root for more information.
4+
5+ using Xtensive . Sql . Info ;
46
57namespace Xtensive . Sql . Drivers . Firebird . v4_0
68{
79 internal class ServerInfoProvider : v2_5 . ServerInfoProvider
810 {
11+ public override QueryInfo GetQueryInfo ( )
12+ {
13+ var info = base . GetQueryInfo ( ) ;
14+ info . Features |= QueryFeatures . CrossApply ;
15+ return info ;
16+ }
17+
918 public ServerInfoProvider ( SqlDriver driver )
1019 : base ( driver )
1120 {
Original file line number Diff line number Diff line change 1- using System ;
2- using System . Collections . Generic ;
3- using System . Text ;
1+ // Copyright (C) 2021 Xtensive LLC.
2+ // This code is distributed under MIT license terms.
3+ // See the License.txt file in the project root for more information.
4+
5+ using Xtensive . Sql . Compiler ;
6+ using Xtensive . Sql . Dml ;
47
58namespace Xtensive . Sql . Drivers . Firebird . v4_0
69{
710 internal class Translator : v2_5 . Translator
811 {
12+ public override string Translate ( SqlCompilerContext context , SqlJoinExpression node , JoinSection section )
13+ {
14+ switch ( section ) {
15+ case JoinSection . Specification : {
16+ if ( node . Expression == null ) {
17+ switch ( node . JoinType ) {
18+ case SqlJoinType . CrossApply :
19+ return "CROSS JOIN LATERAL" ;
20+ case SqlJoinType . LeftOuterApply :
21+ return "LEFT JOIN LATERAL" ;
22+ default :
23+ return base . Translate ( context , node , section ) ;
24+ }
25+ }
26+ return Translate ( node . JoinType ) + " JOIN" ;
27+ }
28+ case JoinSection . Exit : {
29+ if ( node . JoinType == SqlJoinType . LeftOuterApply ) {
30+ return "ON TRUE" ;
31+ }
32+ return string . Empty ;
33+ }
34+ }
35+ return base . Translate ( context , node , section ) ;
36+ }
37+
938 // Constructors
1039
1140 /// <inheritdoc/>
You can’t perform that action at this time.
0 commit comments