File tree Expand file tree Collapse file tree 1 file changed +0
-37
lines changed
Orm/Xtensive.Orm.MySql/Sql.Drivers.MySql/v8_0 Expand file tree Collapse file tree 1 file changed +0
-37
lines changed Original file line number Diff line number Diff line change 44// Created by: Alexey Kulakov
55// Created: 2022.02.03
66
7- using Xtensive . Sql . Compiler ;
8- using Xtensive . Sql . Dml ;
9-
107namespace Xtensive . Sql . Drivers . MySql . v8_0
118{
129 internal class Compiler : v5_7 . Compiler
1310 {
14- /// <inheritdoc/>
15- public override void Visit ( SqlQueryExpression node )
16- {
17- using ( context . EnterScope ( node ) ) {
18- var wrapLeft = node . Left is SqlSelect sL
19- && ( sL . OrderBy . Count > 0 || sL . HasLimit || sL . Lock != SqlLockType . Empty ) ;
20- var wrapRight = node . Left is SqlSelect sR
21- && ( sR . OrderBy . Count > 0 || sR . HasLimit || sR . Lock != SqlLockType . Empty ) ;
22-
23- AppendTranslatedEntry ( node ) ;
24- if ( wrapLeft ) {
25- _ = context . Output . Append ( "(" ) ;
26- node . Left . AcceptVisitor ( this ) ;
27- _ = context . Output . Append ( ")" ) ;
28- }
29- else {
30- node . Left . AcceptVisitor ( this ) ;
31- }
32-
33- AppendTranslated ( node . NodeType ) ;
34- AppendTranslated ( node , QueryExpressionSection . All ) ;
35-
36- if ( wrapRight ) {
37- _ = context . Output . Append ( "(" ) ;
38- node . Right . AcceptVisitor ( this ) ;
39- _ = context . Output . Append ( ")" ) ;
40- }
41- else {
42- node . Right . AcceptVisitor ( this ) ;
43- }
44- AppendTranslatedExit ( node ) ;
45- }
46- }
47-
4811
4912 // Constructors
5013
You can’t perform that action at this time.
0 commit comments