sequel_pg 1.12.3 → 1.12.4
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/ext/sequel_pg/sequel_pg.c +6 -5
- metadata +7 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6fd331562b3092789479e69cb8de82bf5593014d0e9d58efb58ae0ac0cc519a
|
4
|
+
data.tar.gz: d0d29de191faa1093a18a9ccd7ea3bc4e51b4bb1c8ed207e464d3b749846199a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe7358271c4e788614111f42db5507fb251af87a853b867920871d6e85c1679f752453742d4add9078841655416317c855e2f6fe2d403611b915b5e1d4960852
|
7
|
+
data.tar.gz: 761b2fdc14026cf8e9c76bc6865e9b8ab0449b28a3fd6fdea10df616b1ffbb18971ff1cdb1ceb3b7bdc3b077ba4e608697e32ce00b6ee769692a45e3e6a5a941
|
data/CHANGELOG
CHANGED
data/ext/sequel_pg/sequel_pg.c
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#define SEQUEL_PG_VERSION_INTEGER
|
1
|
+
#define SEQUEL_PG_VERSION_INTEGER 11204
|
2
2
|
|
3
3
|
#include <string.h>
|
4
4
|
#include <stdio.h>
|
@@ -72,8 +72,10 @@
|
|
72
72
|
/* External functions defined by ruby-pg */
|
73
73
|
PGconn* pg_get_pgconn(VALUE);
|
74
74
|
PGresult* pgresult_get(VALUE);
|
75
|
+
int pg_get_result_enc_idx(VALUE);
|
75
76
|
|
76
77
|
static int spg_use_ipaddr_alloc;
|
78
|
+
static int spg_use_pg_get_result_enc_idx;
|
77
79
|
|
78
80
|
static VALUE spg_Sequel;
|
79
81
|
static VALUE spg_PGArray;
|
@@ -1387,7 +1389,7 @@ static VALUE spg_yield_hash_rows(VALUE self, VALUE rres, VALUE ignore) {
|
|
1387
1389
|
}
|
1388
1390
|
res = pgresult_get(rres);
|
1389
1391
|
|
1390
|
-
enc_index = enc_get_index(rres);
|
1392
|
+
enc_index = spg_use_pg_get_result_enc_idx ? pg_get_result_enc_idx(rres) : enc_get_index(rres);
|
1391
1393
|
|
1392
1394
|
ntuples = PQntuples(res);
|
1393
1395
|
nfields = PQnfields(res);
|
@@ -1655,7 +1657,7 @@ static VALUE spg__yield_each_row(VALUE self) {
|
|
1655
1657
|
rb_funcall(rres, spg_id_check, 0);
|
1656
1658
|
res = pgresult_get(rres);
|
1657
1659
|
|
1658
|
-
enc_index = enc_get_index(rres);
|
1660
|
+
enc_index = spg_use_pg_get_result_enc_idx ? pg_get_result_enc_idx(rres) : enc_get_index(rres);
|
1659
1661
|
|
1660
1662
|
/* Only handle regular and model types. All other types require compiling all
|
1661
1663
|
* of the results at once, which is not a use case for streaming. The streaming
|
@@ -1760,8 +1762,7 @@ void Init_sequel_pg(void) {
|
|
1760
1762
|
}
|
1761
1763
|
|
1762
1764
|
if (RTEST(rb_eval_string("defined?(PG::VERSION) && PG::VERSION.to_f >= 1.2"))) {
|
1763
|
-
|
1764
|
-
return;
|
1765
|
+
spg_use_pg_get_result_enc_idx = 1;
|
1765
1766
|
}
|
1766
1767
|
|
1767
1768
|
rb_const_set(spg_Postgres, rb_intern("SEQUEL_PG_VERSION_INTEGER"), INT2FIX(SEQUEL_PG_VERSION_INTEGER));
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel_pg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.12.
|
4
|
+
version: 1.12.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Evans
|
@@ -17,6 +17,9 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.18.0
|
20
|
+
- - "!="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.2.0
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -24,6 +27,9 @@ dependencies:
|
|
24
27
|
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 0.18.0
|
30
|
+
- - "!="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.2.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: sequel
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|