sequel_pg 1.6.13 → 1.6.14
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/CHANGELOG +4 -0
- data/MIT-LICENSE +1 -1
- data/ext/sequel_pg/sequel_pg.c +21 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91af2dd3a1d7acffb3c537705be4133d7dfd354e
|
4
|
+
data.tar.gz: 819ee4e9762bd7650ff1dd1d1597322ad6f1c02f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abfbce08b4c38a56a20de00cd72f8e66ca2dadfaaf5af1ab26748f962e5aec9abb6fb47ab428c7e3d58404a7b67c4515da5699def99bf5a8985ce1855c35b757
|
7
|
+
data.tar.gz: 7cb3f3988ba3de7877e3686ff801841cbb53bddb506e6f1148a974930c7c61bd8d0834a822c0dcb0903a17dc8076b9687acb88351ced933a931d37625401d7d4
|
data/CHANGELOG
CHANGED
data/MIT-LICENSE
CHANGED
data/ext/sequel_pg/sequel_pg.c
CHANGED
@@ -246,6 +246,27 @@ static VALUE parse_pg_array(VALUE self, VALUE pg_array_string, VALUE converter)
|
|
246
246
|
char *word = RSTRING_PTR(buf);
|
247
247
|
int index = 1;
|
248
248
|
|
249
|
+
if (array_string_length == 0) {
|
250
|
+
rb_raise(rb_eArgError, "unexpected PostgreSQL array format, empty");
|
251
|
+
}
|
252
|
+
|
253
|
+
switch (c_pg_array_string[0]) {
|
254
|
+
case '[':
|
255
|
+
/* Skip explicit subscripts, scanning until opening array */
|
256
|
+
for(;index < array_string_length && c_pg_array_string[index] != '{'; ++index)
|
257
|
+
/* nothing */;
|
258
|
+
|
259
|
+
if (index >= array_string_length) {
|
260
|
+
rb_raise(rb_eArgError, "unexpected PostgreSQL array format, no {");
|
261
|
+
} else {
|
262
|
+
++index;
|
263
|
+
}
|
264
|
+
case '{':
|
265
|
+
break;
|
266
|
+
default:
|
267
|
+
rb_raise(rb_eArgError, "unexpected PostgreSQL array format, doesn't start with { or [");
|
268
|
+
}
|
269
|
+
|
249
270
|
return read_array(&index, c_pg_array_string, array_string_length, word, converter
|
250
271
|
#ifdef SPG_ENCODING
|
251
272
|
, enc_get_index(pg_array_string)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel_pg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Evans
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
93
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.
|
94
|
+
rubygems_version: 2.5.1
|
95
95
|
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: Faster SELECTs when using Sequel with pg
|