sequel-combine 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/README.md +4 -0
- data/lib/sequel-combine/version.rb +1 -1
- data/lib/sequel/extensions/combine.rb +2 -0
- 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: 0c00112dec99306464a50ad8c2b38e8aba553370
|
4
|
+
data.tar.gz: ec924b0b613fb55aad5981f4b8a60bf0dbc35b63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c3b500c4d19a9be79c681edfdcd061befd78f77e83c1b1e1c69903c85ef806f893070d08089a27d8578cb9fa4ceaa1b2970a6e73371f0afbe1813070415b8e7
|
7
|
+
data.tar.gz: 6350bfe5e887648346016e17fc10a1c1ec14dfcb1117c1f6f8a2c5eba790fb9fa2894d1370928842a5ce1351c2b3b39fd3377baaa16528ae58cfd75995fc706f
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
### 1.0.
|
1
|
+
### 1.0.2 (2018.02.01)
|
2
|
+
|
3
|
+
* Add raising error when #combine is used with unsupported adapter(wmaciejak) #6
|
4
|
+
|
5
|
+
### 1.0.1 (2018.01.31)
|
2
6
|
|
3
7
|
* General refactor, provide more meaningful naming (Zip753) #5
|
4
8
|
* Set minimal required version of Sequel to 3.48.0 (wmaciejak)
|
data/README.md
CHANGED
@@ -22,6 +22,10 @@ The plugin needs to be initialized by the Sequel extension interface. The simple
|
|
22
22
|
```ruby
|
23
23
|
Sequel.extension :combine
|
24
24
|
```
|
25
|
+
or
|
26
|
+
```ruby
|
27
|
+
Sequel::Database.extension :combine
|
28
|
+
```
|
25
29
|
|
26
30
|
But anyway I recommend reading more about [Sequel extensions system](https://github.com/jeremyevans/sequel/blob/master/doc/extensions.rdoc#sequel-extensions).
|
27
31
|
|
@@ -9,6 +9,8 @@ module Sequel
|
|
9
9
|
AGGREGATED_ROW_ALIAS = :ROW
|
10
10
|
|
11
11
|
def combine(options)
|
12
|
+
raise Sequel::DatabaseError, "Invalid adapter. PostgreSQL driver not found." unless Sequel::Postgres::USES_PG
|
13
|
+
|
12
14
|
column_mappings = options.map { |type, relations| combine_columns(type, relations) }
|
13
15
|
column_mapping = column_mappings.reduce({}, :merge)
|
14
16
|
select_append do
|