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 4
4
// Created by: Alexey Kulakov
5
5
// Created: 2022.02.03
6
6
7
- using Xtensive . Sql . Compiler ;
8
- using Xtensive . Sql . Dml ;
9
-
10
7
namespace Xtensive . Sql . Drivers . MySql . v8_0
11
8
{
12
9
internal class Compiler : v5_7 . Compiler
13
10
{
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
-
48
11
49
12
// Constructors
50
13
You can’t perform that action at this time.
0 commit comments