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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3ba30372afe321f1272a82f92626c846495fbc07
4
- data.tar.gz: 13be4f50236edb9b47b1d4273509acd3c1c29942
3
+ metadata.gz: 0c00112dec99306464a50ad8c2b38e8aba553370
4
+ data.tar.gz: ec924b0b613fb55aad5981f4b8a60bf0dbc35b63
5
5
  SHA512:
6
- metadata.gz: 101f582d51ea2161e3f36db6f858ceb51d53017936e30c182bd4a6e1b759e63e720608bf96b1282650027491ab6f783921fffeb996df89e8baf860cba5ce0353
7
- data.tar.gz: d2565434f20e2699c84bf91e01cd5bf36771861e73576dbcadf638effb5c4851a2363d76de789ccbbdd114fd29498eec0eb0d15b70cc241ae5dbc9f016087e6a
6
+ metadata.gz: 1c3b500c4d19a9be79c681edfdcd061befd78f77e83c1b1e1c69903c85ef806f893070d08089a27d8578cb9fa4ceaa1b2970a6e73371f0afbe1813070415b8e7
7
+ data.tar.gz: 6350bfe5e887648346016e17fc10a1c1ec14dfcb1117c1f6f8a2c5eba790fb9fa2894d1370928842a5ce1351c2b3b39fd3377baaa16528ae58cfd75995fc706f
@@ -1,4 +1,8 @@
1
- ### 1.0.1 (2018.02.01)
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SequelCombine
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
5
5
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel-combine
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wojciech Maciejak