sequel_pg 1.12.0 → 1.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +8 -0
- data/ext/sequel_pg/extconf.rb +3 -0
- data/ext/sequel_pg/sequel_pg.c +16 -16
- data/lib/sequel_pg/sequel_pg.rb +2 -2
- metadata +9 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 528cbe96782613e32c825226124c36d6f7b787689bcd0862464cd8e2e85427bf
|
4
|
+
data.tar.gz: 2d5d75d6268b6343111e0063472da702a03b819d314f00c0e9dc3d9cc8ba65dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4299be5ad9579b0b7eea466b432d78b6c2b6dfe90a2198a9bdc2994a17aed462955553b6f4fb7a4bcb8d43b0f70c34552cf6e0db452dc4fe364bf586cece97f7
|
7
|
+
data.tar.gz: 4e27c83e62b1524f1265a9dc3c91c6d77de4a24a2a371048f9ccff4a41472fca46dbf5868bcd9da4cf95dfcf7fcbf61153134d563e2ad86707d2e55a5c9e0db9
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
=== 1.12.1 (2019-05-31)
|
2
|
+
|
3
|
+
* Avoid using Proc.new without block, fixing deprecation warning on ruby 2.7+ (jeremyevans)
|
4
|
+
|
5
|
+
* Use rb_gc_register_mark_object instead of rb_global_variable (jeremyevans)
|
6
|
+
|
7
|
+
* Use pkg_config instead of pg_config for configuration (jeremyevans) (#31)
|
8
|
+
|
1
9
|
=== 1.12.0 (2019-03-01)
|
2
10
|
|
3
11
|
* Allow Dataset#paged_each to be called without a block when using streaming (jeremyevans)
|
data/ext/sequel_pg/extconf.rb
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
require 'mkmf'
|
2
2
|
$CFLAGS << " -O0 -g" if ENV['DEBUG']
|
3
3
|
$CFLAGS << " -Wall " unless RUBY_PLATFORM =~ /solaris/
|
4
|
+
|
5
|
+
if ENV["POSTGRES_INCLUDE"] || ENV["POSTGRES_LIB"] || !pkg_config('libpq')
|
4
6
|
dir_config('pg', ENV["POSTGRES_INCLUDE"] || (IO.popen("pg_config --includedir").readline.chomp rescue nil),
|
5
7
|
ENV["POSTGRES_LIB"] || (IO.popen("pg_config --libdir").readline.chomp rescue nil))
|
8
|
+
end
|
6
9
|
|
7
10
|
if (have_library('pq') || have_library('libpq') || have_library('ms/libpq')) && have_header('libpq-fe.h')
|
8
11
|
have_func 'PQsetSingleRowMode'
|
data/ext/sequel_pg/sequel_pg.c
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#define SEQUEL_PG_VERSION_INTEGER
|
1
|
+
#define SEQUEL_PG_VERSION_INTEGER 11201
|
2
2
|
|
3
3
|
#include <string.h>
|
4
4
|
#include <stdio.h>
|
@@ -1745,7 +1745,7 @@ void Init_sequel_pg(void) {
|
|
1745
1745
|
VALUE c, spg_Postgres;
|
1746
1746
|
|
1747
1747
|
spg_Sequel = rb_const_get(rb_cObject, rb_intern("Sequel"));
|
1748
|
-
|
1748
|
+
rb_gc_register_mark_object(spg_Sequel);
|
1749
1749
|
spg_Postgres = rb_const_get(spg_Sequel, rb_intern("Postgres"));
|
1750
1750
|
|
1751
1751
|
if(rb_obj_respond_to(spg_Postgres, rb_intern("sequel_pg_version_supported?"), 0)) {
|
@@ -1837,35 +1837,35 @@ void Init_sequel_pg(void) {
|
|
1837
1837
|
spg_sym_cidr = ID2SYM(rb_intern("cidr"));
|
1838
1838
|
|
1839
1839
|
spg_Blob = rb_const_get(rb_const_get(spg_Sequel, rb_intern("SQL")), rb_intern("Blob"));
|
1840
|
-
|
1840
|
+
rb_gc_register_mark_object(spg_Blob);
|
1841
1841
|
spg_Blob_instance = rb_obj_freeze(rb_funcall(spg_Blob, spg_id_new, 0));
|
1842
|
-
|
1842
|
+
rb_gc_register_mark_object(spg_Blob_instance);
|
1843
1843
|
spg_SQLTime = rb_const_get(spg_Sequel, rb_intern("SQLTime"));
|
1844
|
-
|
1844
|
+
rb_gc_register_mark_object(spg_SQLTime);
|
1845
1845
|
spg_Date = rb_const_get(rb_cObject, rb_intern("Date"));
|
1846
|
-
|
1846
|
+
rb_gc_register_mark_object(spg_Date);
|
1847
1847
|
spg_DateTime = rb_const_get(rb_cObject, rb_intern("DateTime"));
|
1848
|
-
|
1848
|
+
rb_gc_register_mark_object(spg_DateTime);
|
1849
1849
|
spg_PGError = rb_const_get(rb_const_get(rb_cObject, rb_intern("PG")), rb_intern("Error"));
|
1850
|
-
|
1850
|
+
rb_gc_register_mark_object(spg_PGError);
|
1851
1851
|
|
1852
1852
|
spg_nan = rb_eval_string("0.0/0.0");
|
1853
|
-
|
1853
|
+
rb_gc_register_mark_object(spg_nan);
|
1854
1854
|
spg_pos_inf = rb_eval_string("1.0/0.0");
|
1855
|
-
|
1855
|
+
rb_gc_register_mark_object(spg_pos_inf);
|
1856
1856
|
spg_neg_inf = rb_eval_string("-1.0/0.0");
|
1857
|
-
|
1857
|
+
rb_gc_register_mark_object(spg_neg_inf);
|
1858
1858
|
spg_usec_per_day = ULL2NUM(86400000000ULL);
|
1859
|
-
|
1859
|
+
rb_gc_register_mark_object(spg_usec_per_day);
|
1860
1860
|
|
1861
1861
|
rb_require("ipaddr");
|
1862
1862
|
spg_IPAddr = rb_const_get(rb_cObject, rb_intern("IPAddr"));
|
1863
|
-
|
1863
|
+
rb_gc_register_mark_object(spg_IPAddr);
|
1864
1864
|
spg_use_ipaddr_alloc = RTEST(rb_eval_string("IPAddr.new.instance_variables.sort == [:@addr, :@family, :@mask_addr]"));
|
1865
1865
|
spg_vmasks4 = rb_eval_string("a = [0]*33; a[0] = 0; a[32] = 0xffffffff; 31.downto(1){|i| a[i] = a[i+1] - (1 << (31 - i))}; a.freeze");
|
1866
|
-
|
1866
|
+
rb_gc_register_mark_object(spg_vmasks4);
|
1867
1867
|
spg_vmasks6 = rb_eval_string("a = [0]*129; a[0] = 0; a[128] = 0xffffffffffffffffffffffffffffffff; 127.downto(1){|i| a[i] = a[i+1] - (1 << (127 - i))}; a.freeze");
|
1868
|
-
|
1868
|
+
rb_gc_register_mark_object(spg_vmasks6);
|
1869
1869
|
|
1870
1870
|
c = rb_const_get(spg_Postgres, rb_intern("Dataset"));
|
1871
1871
|
rb_undef_method(c, "yield_hash_rows");
|
@@ -1891,5 +1891,5 @@ void Init_sequel_pg(void) {
|
|
1891
1891
|
|
1892
1892
|
rb_require("sequel/extensions/pg_array");
|
1893
1893
|
spg_PGArray = rb_const_get(spg_Postgres, rb_intern("PGArray"));
|
1894
|
-
|
1894
|
+
rb_gc_register_mark_object(spg_PGArray);
|
1895
1895
|
}
|
data/lib/sequel_pg/sequel_pg.rb
CHANGED
@@ -74,9 +74,9 @@ class Sequel::Postgres::Dataset
|
|
74
74
|
if defined?(Sequel::Model::ClassMethods)
|
75
75
|
# If model loads are being optimized and this is a model load, use the optimized
|
76
76
|
# version.
|
77
|
-
def each
|
77
|
+
def each(&block)
|
78
78
|
if optimize_model_load?
|
79
|
-
clone(:_sequel_pg_type=>:model, :_sequel_pg_value=>row_proc).fetch_rows(sql, &
|
79
|
+
clone(:_sequel_pg_type=>:model, :_sequel_pg_value=>row_proc).fetch_rows(sql, &block)
|
80
80
|
else
|
81
81
|
super
|
82
82
|
end
|
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.12.
|
4
|
+
version: 1.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Evans
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -67,7 +67,12 @@ files:
|
|
67
67
|
homepage: http://github.com/jeremyevans/sequel_pg
|
68
68
|
licenses:
|
69
69
|
- MIT
|
70
|
-
metadata:
|
70
|
+
metadata:
|
71
|
+
bug_tracker_uri: https://github.com/jeremyevans/sequel_pg/issues
|
72
|
+
changelog_uri: https://github.com/jeremyevans/sequel_pg/blob/master/CHANGELOG
|
73
|
+
documentation_uri: https://github.com/jeremyevans/sequel_pg/blob/master/README.rdoc
|
74
|
+
mailing_list_uri: https://groups.google.com/forum/#!forum/sequel-talk
|
75
|
+
source_code_uri: https://github.com/jeremyevans/sequel_pg
|
71
76
|
post_install_message:
|
72
77
|
rdoc_options:
|
73
78
|
- "--quiet"
|
@@ -90,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
95
|
- !ruby/object:Gem::Version
|
91
96
|
version: '0'
|
92
97
|
requirements: []
|
93
|
-
rubygems_version: 3.0.
|
98
|
+
rubygems_version: 3.0.3
|
94
99
|
signing_key:
|
95
100
|
specification_version: 4
|
96
101
|
summary: Faster SELECTs when using Sequel with pg
|