rom-sql 3.3.2 → 3.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -1
- data/LICENSE +1 -1
- data/lib/rom/plugins/relation/sql/postgres/streaming.rb +11 -0
- data/lib/rom/sql/function.rb +6 -11
- data/lib/rom/sql/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfe5975f2fc0756a0a3f8239916f58c4f6dc307a3af1d7cdd1d62bbcd7c4cfc1
|
4
|
+
data.tar.gz: 68c896292b5bde03e255552acb84d6952d21bb705bedc43f6f36811f5bb350c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d951459dc868955f1cddd1b77ac56f0aa8b71e556afd0cdea382241da0572a04c26da3f1fd9f73e49b53e93559e8b436d63681d0fefbe56f2e41e7284709012e
|
7
|
+
data.tar.gz: 7d151a47318bfe9ad5caeb5b0977dc31eb5f1577ed2707a43f4c88715c10bc0e00d4145571da8bff72e515ee1b7caa46911d0bfc896e570f303a1496f6436ae7
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
<!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
|
2
2
|
|
3
|
-
## 3.3.
|
3
|
+
## 3.3.3 2021-03-05
|
4
|
+
|
5
|
+
|
6
|
+
### Added
|
7
|
+
|
8
|
+
- Support for streaming composite relations (@ianks)
|
9
|
+
|
10
|
+
|
11
|
+
[Compare v3.3.2...v3.3.3](https://github.com/rom-rb/rom-sql/compare/v3.3.2...v3.3.3)
|
12
|
+
|
13
|
+
## 3.3.2 2021-01-06
|
4
14
|
|
5
15
|
|
6
16
|
### Fixed
|
data/LICENSE
CHANGED
@@ -36,6 +36,7 @@ module ROM
|
|
36
36
|
def self.included(klass)
|
37
37
|
super
|
38
38
|
ROM::Relation::Graph.include(Combined)
|
39
|
+
ROM::Relation::Composite.include(Composite)
|
39
40
|
end
|
40
41
|
|
41
42
|
if defined?(JRUBY_VERSION)
|
@@ -82,6 +83,16 @@ module ROM
|
|
82
83
|
raise StreamingNotSupportedError, "not supported on combined relations"
|
83
84
|
end
|
84
85
|
end
|
86
|
+
|
87
|
+
module Composite
|
88
|
+
def stream_each
|
89
|
+
return to_enum unless block_given?
|
90
|
+
|
91
|
+
left.stream_each do |tuple|
|
92
|
+
yield right.call([tuple]).first
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
85
96
|
end
|
86
97
|
end
|
87
98
|
end
|
data/lib/rom/sql/function.rb
CHANGED
@@ -73,23 +73,18 @@ module ROM
|
|
73
73
|
#
|
74
74
|
# @api private
|
75
75
|
def qualified(table_alias = nil)
|
76
|
-
|
77
|
-
arg.respond_to?(:qualified) ? arg.qualified(table_alias) : arg
|
78
|
-
|
76
|
+
meta(
|
77
|
+
func: ::Sequel::SQL::Function.new(func.name, *func.args.map { |arg| arg.respond_to?(:qualified) ? arg.qualified(table_alias) : arg })
|
78
|
+
)
|
79
79
|
end
|
80
80
|
|
81
81
|
# @see Attribute#qualified_projection
|
82
82
|
#
|
83
83
|
# @api private
|
84
84
|
def qualified_projection(table_alias = nil)
|
85
|
-
|
86
|
-
arg.respond_to?(:qualified_projection) ? arg.qualified_projection(table_alias) : arg
|
87
|
-
|
88
|
-
end
|
89
|
-
|
90
|
-
# @api private
|
91
|
-
def new(&block)
|
92
|
-
meta(func: ::Sequel::SQL::Function.new!(func.name, func.args.map(&block), func.opts))
|
85
|
+
meta(
|
86
|
+
func: ::Sequel::SQL::Function.new(func.name, *func.args.map { |arg| arg.respond_to?(:qualified_projection) ? arg.qualified_projection(table_alias) : arg })
|
87
|
+
)
|
93
88
|
end
|
94
89
|
|
95
90
|
# @see Attribute#qualified?
|
data/lib/rom/sql/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rom-sql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|