bmg 0.20.1 → 0.20.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bmg/sequel/translator.rb +1 -1
- data/lib/bmg/sql/nodes/expr.rb +4 -0
- data/lib/bmg/sql/processor/limit_offset.rb +8 -1
- data/lib/bmg/sql/processor/order_by.rb +1 -1
- data/lib/bmg/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45a80b1a3fd00fc27f88f37b41816dd11324aa70
|
4
|
+
data.tar.gz: 9d600dd0619e0d814a07db94c95dc093b61584b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38fefe80ca45ddce14d3310621b82b389db5a7c11ab22bb17563c2c6f7dc769f9a54f9a3bebde6c40a2bbecbae215969857a8cf875a7363ad10261fd5b32b75f
|
7
|
+
data.tar.gz: 91492014f31ff3c540df388cac9e362e16555e373ca59ed178bdf32f7098d176947f7e6432df804a8bb3f34210d8a3762b92ce39d37455ff2ee2e55346bf9bce
|
@@ -11,7 +11,7 @@ module Bmg
|
|
11
11
|
def on_with_exp(sexpr)
|
12
12
|
if sequel_db.select(1).supports_cte?
|
13
13
|
dataset = apply(sexpr.select_exp)
|
14
|
-
apply(sexpr.with_spec).each_pair do |name,subquery|
|
14
|
+
apply(sexpr.with_spec).each_pair do |name, subquery|
|
15
15
|
dataset = dataset.with(name, subquery)
|
16
16
|
end
|
17
17
|
dataset
|
data/lib/bmg/sql/nodes/expr.rb
CHANGED
@@ -18,12 +18,19 @@ module Bmg
|
|
18
18
|
alias :on_intersect :on_set_operator
|
19
19
|
|
20
20
|
def on_select_exp(sexpr)
|
21
|
-
sexpr
|
21
|
+
sexpr = builder.from_self(sexpr) if must_from_self?(sexpr)
|
22
|
+
|
22
23
|
limit_clause = builder.limit_clause(limit)
|
23
24
|
offset_clause = builder.offset_clause(offset)
|
24
25
|
sexpr.with_push(limit_clause, offset_clause)
|
25
26
|
end
|
26
27
|
|
28
|
+
private
|
29
|
+
|
30
|
+
def must_from_self?(sexpr)
|
31
|
+
sexpr.limit_or_offset?
|
32
|
+
end
|
33
|
+
|
27
34
|
end # class LimitOffset
|
28
35
|
end # class Processor
|
29
36
|
end # module Sql
|
data/lib/bmg/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bmg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.20.
|
4
|
+
version: 0.20.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bernard Lambeau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: predicate
|