sequel-bigquery 0.2.0 → 0.3.0

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
  SHA256:
3
- metadata.gz: 13d55b1e469dca990e67e526e1f9774c0e86ce9ddee8619531c6f5ad3c671f7b
4
- data.tar.gz: 10b66d4878ca799922ae38e2c847b5d4a29ade0d1b65be098744210bc9c12d51
3
+ metadata.gz: a1df3065759c1f700359a326b1e039e2e31c7d67785c5fe5c36d11d9933bc03a
4
+ data.tar.gz: 73c44cf0e5a3afea392ca675f7645a788698de6b357f9ec1023f72b5da803891
5
5
  SHA512:
6
- metadata.gz: 2004fdac1976b084a361524147411451f514810bf1d8c0ff50dc8f2161bb63d620a79357a70a5b761cffd8995f9b144023f64cefb40330b36a4961844b6aefbd
7
- data.tar.gz: b131f9e89bea9e6839c65220961e9d7b157b5baf6cb7761f26872d7c35750a9995d115e99454830cd90b2fe8df705b0ee90e05c8de0ce0d115ef1ff92ad8340f
6
+ metadata.gz: 5fe03d5ba85f4b7daf490f5f1f6038f8d2101c78afcc20911a2b909c2bb73c683d8a094c3cf9229871dc6f2862b746cfd14797fe8d5091904955450600a25383
7
+ data.tar.gz: bb26c418a72d251ab8d68d458ff51a108f053d83cbf326e962aa8cce446e0d5726b4da8d3d1ba7c50978d6e7de4ef362003eeea74fa414a4c5fbb6e2cf39a370
data/README.md CHANGED
@@ -31,6 +31,7 @@ Features:
31
31
  - Updating rows, with automatic addition of `where 1 = 1` to statements (since BigQuery requires a `where` clause)
32
32
  - Querying
33
33
  - Transactions (buffered since BigQuery only supports them when you execute the whole transaction at once)
34
+ - Table partitioning
34
35
  - Ruby types:
35
36
  + String
36
37
  + Integer
@@ -173,6 +173,22 @@ module Sequel
173
173
  'Note that no result data is returned while the transaction is open.',
174
174
  )
175
175
  end
176
+
177
+ # SQL for creating a table with BigQuery specific options
178
+ def create_table_sql(name, generator, options)
179
+ "#{super}#{create_table_suffix_sql(name, options)}"
180
+ end
181
+
182
+ # Handle BigQuery specific table extensions (i.e. partitioning)
183
+ def create_table_suffix_sql(_name, options)
184
+ sql = +''
185
+
186
+ if (partition_by = options[:partition_by])
187
+ sql << " PARTITION BY #{literal(Array(partition_by))}"
188
+ end
189
+
190
+ sql
191
+ end
176
192
  end
177
193
 
178
194
  class Dataset < Sequel::Dataset
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sequel
4
4
  module Bigquery
5
- VERSION = '0.2.0'
5
+ VERSION = '0.3.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel-bigquery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brendan Weibrecht
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-26 00:00:00.000000000 Z
11
+ date: 2021-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: amazing_print
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  requirements: []
101
- rubygems_version: 3.1.6
101
+ rubygems_version: 3.2.16
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: A Sequel adapter for Google's BigQuery