@@ -632,14 +632,14 @@ function serialize!(c::LimitClause, ctx)
632
632
start = c. offset
633
633
count = c. limit
634
634
start != = nothing || count != = nothing || return
635
- if ctx. dialect. limit_style === LIMIT_STYLE. MYSQL
635
+ if ctx. dialect. limit_style == LIMIT_STYLE. MYSQL
636
636
newline (ctx)
637
637
print (ctx, " LIMIT " )
638
638
if start != = nothing
639
639
print (ctx, start, " , " )
640
640
end
641
641
print (ctx, count != = nothing ? count : " 18446744073709551615" )
642
- elseif ctx. dialect. limit_style == LIMIT_STYLE. POSTGRESQL
642
+ elseif ctx. dialect. limit_style in ( LIMIT_STYLE. POSTGRESQL, LIMIT_STYLE . ADQL)
643
643
if count != = nothing
644
644
newline (ctx)
645
645
print (ctx, " LIMIT " , count)
@@ -648,7 +648,7 @@ function serialize!(c::LimitClause, ctx)
648
648
newline (ctx)
649
649
print (ctx, " OFFSET " , start)
650
650
end
651
- elseif ctx. dialect. limit_style === LIMIT_STYLE. SQLITE
651
+ elseif ctx. dialect. limit_style == LIMIT_STYLE. SQLITE
652
652
newline (ctx)
653
653
print (ctx, " LIMIT " , count != = nothing ? count : - 1 )
654
654
if start != = nothing
@@ -806,12 +806,19 @@ function serialize!(c::SelectClause, ctx)
806
806
if top != = nothing
807
807
limit = top. limit
808
808
with_ties = top. with_ties
809
- elseif ctx. dialect. limit_style === LIMIT_STYLE. SQLSERVER
809
+ elseif ctx. dialect. limit_style == LIMIT_STYLE. SQLSERVER
810
810
if @dissect (over, limit_over |> LIMIT (offset = nothing , limit = limit, with_ties = with_ties))
811
811
over = limit_over
812
812
elseif nested && @dissect (over, ORDER ())
813
813
offset_0_rows = true
814
814
end
815
+ elseif ctx. dialect. limit_style == LIMIT_STYLE. ADQL
816
+ if @dissect (over, limit_over |> LIMIT (offset = offset, limit = limit, with_ties = with_ties))
817
+ over = limit_over
818
+ if offset != = nothing
819
+ over = LIMIT (over = over, offset = offset)
820
+ end
821
+ end
815
822
end
816
823
print (ctx, " SELECT" )
817
824
if limit != = nothing
0 commit comments