sequel_pg 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,4 +1,8 @@
1
- === 1.0.2
1
+ === 1.1.0 (2011-06-01)
2
+
3
+ * Work with new Database#conversion_procs method in Sequel 3.24.0 (jeremyevans)
4
+
5
+ === 1.0.2 (2011-03-16)
2
6
 
3
7
  * Build the Windows gem against PostgreSQL 9.0.1 to support the new default bytea serialization format (jeremyevans)
4
8
 
@@ -6,10 +10,10 @@
6
10
 
7
11
  * Fix handling of timestamps with fractional seconds and offsets (funny-falcon)
8
12
 
9
- === 1.0.1
13
+ === 1.0.1 (2010-09-12)
10
14
 
11
15
  * Correctly handle timestamps with negative offsets and fractional hours (jeremyevans)
12
16
 
13
- === 1.0.0
17
+ === 1.0.0 (2010-08-31)
14
18
 
15
19
  * Initial Public Release
data/README.rdoc CHANGED
@@ -51,7 +51,7 @@ and 1.9.
51
51
 
52
52
  sequel_pg doesn't ship with it's own specs. It's designed to
53
53
  replace a part of Sequel, so it just uses Sequel's specs.
54
- Specifically, the spec_postgres spec from Sequel.
54
+ Specifically, the spec_postgres rake task from Sequel.
55
55
 
56
56
  == Reporting issues/bugs
57
57
 
@@ -125,12 +125,17 @@ above, please test and send me a report including:
125
125
  date format to ISO by default, so unless you are overriding that
126
126
  setting (via Sequel::Postgres.use_iso_date_format = false), you
127
127
  should be OK.
128
- * Adding your own type conversion procs to Sequel::Postgres::PG_TYPES
129
- only has an effect if those types are not handled by default.
128
+ * Adding your own type conversion procs only has an effect if those
129
+ types are not handled by default.
130
130
  * The named_timezones plugin does not integrate with sequel_pg, since
131
131
  sequel_pg does it's own timestamp conversions. The :local and :utc
132
132
  settings for database_timestamp and application_timestamp do work,
133
133
  as does setting the datetime_class to DateTime.
134
+ * You do not need to require the library, the sequel postgres adapter
135
+ will require it automatically. If you are using bundler, you
136
+ should add it to your Gemfile like so:
137
+
138
+ gem 'sequel_pg', :require=>'sequel'
134
139
 
135
140
  == Author
136
141
 
@@ -23,7 +23,6 @@
23
23
  #define SPG_APP_UTC 8
24
24
 
25
25
  static VALUE spg_Sequel;
26
- static VALUE spg_PG_TYPES;
27
26
  static VALUE spg_Blob;
28
27
  static VALUE spg_BigDecimal;
29
28
  static VALUE spg_Date;
@@ -49,6 +48,9 @@ static ID spg_id_new_offset;
49
48
  static ID spg_id_call;
50
49
  static ID spg_id_get;
51
50
 
51
+ static ID spg_id_db;
52
+ static ID spg_id_conversion_procs;
53
+
52
54
  static ID spg_id_columns;
53
55
  static ID spg_id_encoding;
54
56
 
@@ -242,6 +244,7 @@ static VALUE spg_yield_hash_rows(VALUE self, VALUE rres, VALUE ignore) {
242
244
  VALUE h, rv;
243
245
  size_t l;
244
246
  char * v;
247
+ VALUE conv_procs = NULL;
245
248
 
246
249
  #ifdef SPG_ENCODING
247
250
  int enc_index;
@@ -281,7 +284,10 @@ static VALUE spg_yield_hash_rows(VALUE self, VALUE rres, VALUE ignore) {
281
284
  colconvert[j] = Qnil;
282
285
  break;
283
286
  default:
284
- colconvert[j] = rb_funcall(spg_PG_TYPES, spg_id_get, 1, INT2NUM(i));
287
+ if (conv_procs == NULL) {
288
+ conv_procs = rb_funcall(rb_funcall(self, spg_id_db, 0), spg_id_conversion_procs, 0);
289
+ }
290
+ colconvert[j] = rb_funcall(conv_procs, spg_id_get, 1, INT2NUM(i));
285
291
  break;
286
292
  }
287
293
  }
@@ -378,6 +384,9 @@ void Init_sequel_pg(void) {
378
384
  spg_id_call = rb_intern("call");
379
385
  spg_id_get = rb_intern("[]");
380
386
 
387
+ spg_id_db = rb_intern("db");
388
+ spg_id_conversion_procs = rb_intern("conversion_procs");
389
+
381
390
  spg_id_columns = rb_intern("@columns");
382
391
  spg_id_encoding = rb_intern("@encoding");
383
392
 
@@ -389,7 +398,6 @@ void Init_sequel_pg(void) {
389
398
  spg_BigDecimal = rb_funcall(rb_cObject, cg, 1, rb_str_new2("BigDecimal"));
390
399
  spg_Date = rb_funcall(rb_cObject, cg, 1, rb_str_new2("Date"));
391
400
  spg_Postgres = rb_funcall(spg_Sequel, cg, 1, rb_str_new2("Postgres"));
392
- spg_PG_TYPES = rb_funcall(spg_Postgres, cg, 1, rb_str_new2("PG_TYPES"));
393
401
 
394
402
  rb_global_variable(&spg_Sequel);
395
403
  rb_global_variable(&spg_Blob);
metadata CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
+ - 1
8
9
  - 0
9
- - 2
10
- version: 1.0.2
10
+ version: 1.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeremy Evans
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-16 00:00:00 -07:00
18
+ date: 2011-06-01 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -42,12 +42,12 @@ dependencies:
42
42
  requirements:
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
- hash: 31
45
+ hash: 103
46
46
  segments:
47
47
  - 3
48
- - 6
48
+ - 24
49
49
  - 0
50
- version: 3.6.0
50
+ version: 3.24.0
51
51
  type: :runtime
52
52
  version_requirements: *id002
53
53
  description: |