activerecord-ingres-adapter 3.0.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/activerecord_ingres_adapter.gemspec +1 -1
- data/lib/arel/visitors/ingres.rb +13 -13
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 20c64a2c0d80f449bed1443f9bf017995f9723eb
|
|
4
|
+
data.tar.gz: a8e13cb6bf573cb33623bcc71dd4d5d32c509501
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c4a8183275860990ec2627806673358138d247f13f26b2017be0c7e741eae36766ccca13780bfd3ebd893ee148d50ade406783715f2b47e04796befc531b87f8
|
|
7
|
+
data.tar.gz: 506a6c9a959d09349138380e141ee5d73aecaf29e41d2db81131162a9ef2e9e4c14498adfc553eddd3b192e8fc4e2635de4d8a0c27a4148555a6fb8d7aad506b
|
|
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = "activerecord-ingres-adapter"
|
|
6
|
-
s.version = "
|
|
6
|
+
s.version = "4.0.0"
|
|
7
7
|
s.summary = "ActiveRecord Ingres Adapter"
|
|
8
8
|
s.email = "felix.bellanger@gmail.com"
|
|
9
9
|
s.homepage = "https://github.com/Keeguon/activerecord-ingres-adapter"
|
data/lib/arel/visitors/ingres.rb
CHANGED
|
@@ -2,28 +2,28 @@ module Arel
|
|
|
2
2
|
module Visitors
|
|
3
3
|
class Ingres < Arel::Visitors::ToSql
|
|
4
4
|
private
|
|
5
|
-
def visit_Arel_Nodes_SelectStatement o
|
|
5
|
+
def visit_Arel_Nodes_SelectStatement o, a
|
|
6
6
|
[
|
|
7
7
|
"SELECT",
|
|
8
|
-
(visit(o.limit) if o.limit),
|
|
9
|
-
o.cores.map { |x| visit_Arel_Nodes_SelectCore x }.join,
|
|
10
|
-
("ORDER BY #{o.orders.map { |x| visit x}.join(', ')}" unless o.orders.empty?),
|
|
11
|
-
(visit(o.offset) if o.offset),
|
|
8
|
+
(visit(o.limit, a) if o.limit),
|
|
9
|
+
o.cores.map { |x| visit_Arel_Nodes_SelectCore x, a }.join,
|
|
10
|
+
("ORDER BY #{o.orders.map { |x| visit x, a }.join(', ')}" unless o.orders.empty?),
|
|
11
|
+
(visit(o.offset a) if o.offset),
|
|
12
12
|
].compact.join ' '
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
def visit_Arel_Nodes_SelectCore o
|
|
15
|
+
def visit_Arel_Nodes_SelectCore o, a
|
|
16
16
|
[
|
|
17
|
-
"#{o.projections.map { |x| visit x }.join ', '}",
|
|
18
|
-
("FROM #{visit(o.source)}" if o.source && !o.source.empty?),
|
|
19
|
-
("WHERE #{o.wheres.map { |x| visit x }.join ' AND ' }" unless o.wheres.empty?),
|
|
20
|
-
("GROUP BY #{o.groups.map { |x| visit x }.join ', ' }" unless o.groups.empty?),
|
|
21
|
-
(visit(o.having) if o.having),
|
|
17
|
+
"#{o.projections.map { |x| visit x, a }.join ', '}",
|
|
18
|
+
("FROM #{visit(o.source, a)}" if o.source && !o.source.empty?),
|
|
19
|
+
("WHERE #{o.wheres.map { |x| visit x, a }.join ' AND ' }" unless o.wheres.empty?),
|
|
20
|
+
("GROUP BY #{o.groups.map { |x| visit x, a }.join ', ' }" unless o.groups.empty?),
|
|
21
|
+
(visit(o.having, a) if o.having),
|
|
22
22
|
].compact.join ' '
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
def visit_Arel_Nodes_Limit o
|
|
26
|
-
"FIRST #{visit o.expr}"
|
|
25
|
+
def visit_Arel_Nodes_Limit o, a
|
|
26
|
+
"FIRST #{visit o.expr, a}"
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
end
|