pg 0.19.0.pre20170115074000 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/ChangeLog +210 -447
- data/History.rdoc +0 -16
- data/Rakefile +3 -3
- data/Rakefile.cross +4 -5
- data/ext/errorcodes.def +0 -9
- data/ext/errorcodes.txt +0 -8
- data/ext/pg.c +1 -1
- data/ext/pg_binary_decoder.c +1 -1
- data/ext/pg_binary_encoder.c +1 -1
- data/ext/pg_coder.c +1 -1
- data/ext/pg_connection.c +22 -22
- data/ext/pg_result.c +8 -8
- data/ext/pg_text_decoder.c +1 -1
- data/ext/pg_text_encoder.c +1 -1
- data/ext/pg_type_map.c +7 -14
- data/ext/pg_type_map_all_strings.c +1 -1
- data/ext/pg_type_map_by_class.c +1 -1
- data/ext/pg_type_map_by_column.c +1 -1
- data/ext/pg_type_map_by_mri_type.c +1 -1
- data/ext/pg_type_map_by_oid.c +1 -1
- data/ext/pg_type_map_in_ruby.c +1 -1
- data/ext/util.c +1 -1
- data/lib/pg.rb +2 -2
- data/lib/pg/result.rb +1 -5
- data/lib/pg/text_decoder.rb +1 -1
- data/lib/pg/text_encoder.rb +1 -1
- data/sample/disk_usage_report.rb +1 -1
- data/sample/pg_statistics.rb +1 -1
- data/sample/replication_monitor.rb +1 -1
- data/spec/pg/result_spec.rb +0 -7
- data/spec/pg/type_map_by_class_spec.rb +1 -1
- metadata +49 -43
- metadata.gz.sig +0 -0
data/History.rdoc
CHANGED
@@ -1,19 +1,3 @@
|
|
1
|
-
== v0.19.1 [YYYY-MM-DD] Michael Granger <ged@FaerieMUD.org>
|
2
|
-
|
3
|
-
Enhancements:
|
4
|
-
- Update error codes to PostgreSQL-9.6
|
5
|
-
- Update Windows binary gems to Ruby-2.4, PostgreSQL 9.6.1 and
|
6
|
-
OpenSSL 1.0.2j.
|
7
|
-
|
8
|
-
Bugfixes:
|
9
|
-
- Use secure JSON methods for JSON (de)serialisation. #248
|
10
|
-
- Fix Result#inspect on a cleared result.
|
11
|
-
- Fix test case that failed on Ruby-2.4. #255
|
12
|
-
|
13
|
-
Documentation fixes:
|
14
|
-
- Talk about Integer instead of Fixnum.
|
15
|
-
- Fix method signature of Coder#encode.
|
16
|
-
|
17
1
|
== v0.19.0 [2016-09-21] Michael Granger <ged@FaerieMUD.org>
|
18
2
|
|
19
3
|
- Deprecate Ruby 1.9
|
data/Rakefile
CHANGED
@@ -60,8 +60,8 @@ $hoespec = Hoe.spec 'pg' do
|
|
60
60
|
self.developer 'Michael Granger', 'ged@FaerieMUD.org'
|
61
61
|
self.developer 'Lars Kanis', 'lars@greiz-reinsdorf.de'
|
62
62
|
|
63
|
-
self.dependency 'rake-compiler', '~>
|
64
|
-
self.dependency 'rake-compiler-dock', '~> 0.
|
63
|
+
self.dependency 'rake-compiler', '~> 0.9', :developer
|
64
|
+
self.dependency 'rake-compiler-dock', '~> 0.5', :developer
|
65
65
|
self.dependency 'hoe', '~> 3.12', :developer
|
66
66
|
self.dependency 'hoe-deveiate', '~> 0.6', :developer
|
67
67
|
self.dependency 'hoe-bundler', '~> 1.0', :developer
|
@@ -185,7 +185,7 @@ end
|
|
185
185
|
|
186
186
|
desc "Update list of server error codes"
|
187
187
|
task :update_error_codes do
|
188
|
-
URL_ERRORCODES_TXT = "http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=src/backend/utils/errcodes.txt;hb=
|
188
|
+
URL_ERRORCODES_TXT = "http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=src/backend/utils/errcodes.txt;hb=HEAD"
|
189
189
|
|
190
190
|
ERRORCODES_TXT = "ext/errorcodes.txt"
|
191
191
|
sh "wget #{URL_ERRORCODES_TXT.inspect} -O #{ERRORCODES_TXT.inspect} || curl #{URL_ERRORCODES_TXT.inspect} -o #{ERRORCODES_TXT.inspect}"
|
data/Rakefile.cross
CHANGED
@@ -29,8 +29,8 @@ class CrossLibrary < OpenStruct
|
|
29
29
|
self.host_platform = toolchain
|
30
30
|
|
31
31
|
# Cross-compilation constants
|
32
|
-
self.openssl_version = ENV['OPENSSL_VERSION'] || '1.0.
|
33
|
-
self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '9.
|
32
|
+
self.openssl_version = ENV['OPENSSL_VERSION'] || '1.0.2h'
|
33
|
+
self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '9.5.4'
|
34
34
|
|
35
35
|
# Check if symlinks work in the current working directory.
|
36
36
|
# This fails, if rake-compiler-dock is running on a Windows box.
|
@@ -291,12 +291,11 @@ task 'gem:windows' => ['ChangeLog'] do
|
|
291
291
|
# Copy gem signing key and certs to be accessable from the docker container
|
292
292
|
mkdir_p 'build/gem'
|
293
293
|
sh "cp ~/.gem/gem-*.pem build/gem/ || true"
|
294
|
-
sh "bundle package"
|
295
294
|
|
296
295
|
RakeCompilerDock.sh <<-EOT
|
297
296
|
mkdir ~/.gem &&
|
298
297
|
(cp build/gem/gem-*.pem ~/.gem/ || true) &&
|
299
|
-
bundle install
|
300
|
-
rake cross native gem RUBY_CC_VERSION=2.
|
298
|
+
bundle install &&
|
299
|
+
rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.6:2.0.0:1.9.3
|
301
300
|
EOT
|
302
301
|
end
|
data/ext/errorcodes.def
CHANGED
@@ -373,10 +373,6 @@
|
|
373
373
|
VALUE klass = define_error_class( "InFailedSqlTransaction", "25" );
|
374
374
|
register_error_class( "25P02", klass );
|
375
375
|
}
|
376
|
-
{
|
377
|
-
VALUE klass = define_error_class( "IdleInTransactionSessionTimeout", "25" );
|
378
|
-
register_error_class( "25P03", klass );
|
379
|
-
}
|
380
376
|
{
|
381
377
|
VALUE klass = define_error_class( "InvalidSqlStatementName", NULL );
|
382
378
|
register_error_class( "26000", klass );
|
@@ -797,11 +793,6 @@
|
|
797
793
|
VALUE klass = define_error_class( "DuplicateFile", "58" );
|
798
794
|
register_error_class( "58P02", klass );
|
799
795
|
}
|
800
|
-
{
|
801
|
-
VALUE klass = define_error_class( "SnapshotTooOld", NULL );
|
802
|
-
register_error_class( "72000", klass );
|
803
|
-
register_error_class( "72", klass );
|
804
|
-
}
|
805
796
|
{
|
806
797
|
VALUE klass = define_error_class( "ConfigFileError", NULL );
|
807
798
|
register_error_class( "F0000", klass );
|
data/ext/errorcodes.txt
CHANGED
@@ -15,9 +15,6 @@
|
|
15
15
|
# src/pl/plpgsql/src/plerrcodes.h
|
16
16
|
# a list of PL/pgSQL condition names and their SQLSTATE codes
|
17
17
|
#
|
18
|
-
# src/pl/tcl/pltclerrcodes.h
|
19
|
-
# the same, for PL/Tcl
|
20
|
-
#
|
21
18
|
# doc/src/sgml/errcodes-list.sgml
|
22
19
|
# a SGML table of error codes for inclusion in the documentation
|
23
20
|
#
|
@@ -232,7 +229,6 @@ Section: Class 25 - Invalid Transaction State
|
|
232
229
|
25007 E ERRCODE_SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED schema_and_data_statement_mixing_not_supported
|
233
230
|
25P01 E ERRCODE_NO_ACTIVE_SQL_TRANSACTION no_active_sql_transaction
|
234
231
|
25P02 E ERRCODE_IN_FAILED_SQL_TRANSACTION in_failed_sql_transaction
|
235
|
-
25P03 E ERRCODE_IDLE_IN_TRANSACTION_SESSION_TIMEOUT idle_in_transaction_session_timeout
|
236
232
|
|
237
233
|
Section: Class 26 - Invalid SQL Statement Name
|
238
234
|
|
@@ -417,10 +413,6 @@ Section: Class 58 - System Error (errors external to PostgreSQL itself)
|
|
417
413
|
58P01 E ERRCODE_UNDEFINED_FILE undefined_file
|
418
414
|
58P02 E ERRCODE_DUPLICATE_FILE duplicate_file
|
419
415
|
|
420
|
-
Section: Class 72 - Snapshot Failure
|
421
|
-
# (class borrowed from Oracle)
|
422
|
-
72000 E ERRCODE_SNAPSHOT_TOO_OLD snapshot_too_old
|
423
|
-
|
424
416
|
Section: Class F0 - Configuration File Error
|
425
417
|
|
426
418
|
# (PostgreSQL-specific error class)
|
data/ext/pg.c
CHANGED
data/ext/pg_binary_decoder.c
CHANGED
data/ext/pg_binary_encoder.c
CHANGED
data/ext/pg_coder.c
CHANGED
@@ -105,7 +105,7 @@ pg_composite_decoder_allocate( VALUE klass )
|
|
105
105
|
|
106
106
|
/*
|
107
107
|
* call-seq:
|
108
|
-
* coder.encode( value
|
108
|
+
* coder.encode( value )
|
109
109
|
*
|
110
110
|
* Encodes the given Ruby object into string representation, without
|
111
111
|
* sending data to/from the database server.
|
data/ext/pg_connection.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* pg_connection.c - PG::Connection class extension
|
3
|
-
* $Id$
|
3
|
+
* $Id: pg_connection.c,v 4d9c4ee44d11 2016/09/04 17:32:03 lars $
|
4
4
|
*
|
5
5
|
*/
|
6
6
|
|
@@ -352,9 +352,9 @@ pgconn_s_connect_start( int argc, VALUE *argv, VALUE klass )
|
|
352
352
|
#ifdef HAVE_PQPING
|
353
353
|
/*
|
354
354
|
* call-seq:
|
355
|
-
* PG::Connection.ping(connection_hash) ->
|
356
|
-
* PG::Connection.ping(connection_string) ->
|
357
|
-
* PG::Connection.ping(host, port, options, tty, dbname, login, password) ->
|
355
|
+
* PG::Connection.ping(connection_hash) -> Fixnum
|
356
|
+
* PG::Connection.ping(connection_string) -> Fixnum
|
357
|
+
* PG::Connection.ping(host, port, options, tty, dbname, login, password) -> Fixnum
|
358
358
|
*
|
359
359
|
* Check server status.
|
360
360
|
*
|
@@ -457,7 +457,7 @@ pgconn_s_encrypt_password(VALUE self, VALUE password, VALUE username)
|
|
457
457
|
|
458
458
|
/*
|
459
459
|
* call-seq:
|
460
|
-
* conn.connect_poll() ->
|
460
|
+
* conn.connect_poll() -> Fixnum
|
461
461
|
*
|
462
462
|
* Returns one of:
|
463
463
|
* [+PGRES_POLLING_READING+]
|
@@ -566,7 +566,7 @@ pgconn_reset_start(VALUE self)
|
|
566
566
|
|
567
567
|
/*
|
568
568
|
* call-seq:
|
569
|
-
* conn.reset_poll ->
|
569
|
+
* conn.reset_poll -> Fixnum
|
570
570
|
*
|
571
571
|
* Checks the status of a connection reset operation.
|
572
572
|
* See #connect_start and #connect_poll for
|
@@ -805,7 +805,7 @@ pgconn_error_message(VALUE self)
|
|
805
805
|
|
806
806
|
/*
|
807
807
|
* call-seq:
|
808
|
-
* conn.socket() ->
|
808
|
+
* conn.socket() -> Fixnum
|
809
809
|
*
|
810
810
|
* Returns the socket's file descriptor for this connection.
|
811
811
|
* <tt>IO.for_fd()</tt> can be used to build a proper IO object to the socket.
|
@@ -880,7 +880,7 @@ pgconn_socket_io(VALUE self)
|
|
880
880
|
|
881
881
|
/*
|
882
882
|
* call-seq:
|
883
|
-
* conn.backend_pid() ->
|
883
|
+
* conn.backend_pid() -> Fixnum
|
884
884
|
*
|
885
885
|
* Returns the process ID of the backend server
|
886
886
|
* process for this connection.
|
@@ -1234,8 +1234,8 @@ pgconn_query_assign_typemap( VALUE self, struct query_params_data *paramsData )
|
|
1234
1234
|
* Each element of the +params+ array may be either:
|
1235
1235
|
* a hash of the form:
|
1236
1236
|
* {:value => String (value of bind parameter)
|
1237
|
-
* :type =>
|
1238
|
-
* :format =>
|
1237
|
+
* :type => Fixnum (oid of type of bind parameter)
|
1238
|
+
* :format => Fixnum (0 for text, 1 for binary)
|
1239
1239
|
* }
|
1240
1240
|
* or, it may be a String. If it is a string, that is equivalent to the hash:
|
1241
1241
|
* { :value => <string value>, :type => 0, :format => 0 }
|
@@ -1377,7 +1377,7 @@ pgconn_prepare(int argc, VALUE *argv, VALUE self)
|
|
1377
1377
|
* SQL query. Each element of the +params+ array may be either:
|
1378
1378
|
* a hash of the form:
|
1379
1379
|
* {:value => String (value of bind parameter)
|
1380
|
-
* :format =>
|
1380
|
+
* :format => Fixnum (0 for text, 1 for binary)
|
1381
1381
|
* }
|
1382
1382
|
* or, it may be a String. If it is a string, that is equivalent to the hash:
|
1383
1383
|
* { :value => <string value>, :format => 0 }
|
@@ -1793,8 +1793,8 @@ pgconn_set_single_row_mode(VALUE self)
|
|
1793
1793
|
* Each element of the +params+ array may be either:
|
1794
1794
|
* a hash of the form:
|
1795
1795
|
* {:value => String (value of bind parameter)
|
1796
|
-
* :type =>
|
1797
|
-
* :format =>
|
1796
|
+
* :type => Fixnum (oid of type of bind parameter)
|
1797
|
+
* :format => Fixnum (0 for text, 1 for binary)
|
1798
1798
|
* }
|
1799
1799
|
* or, it may be a String. If it is a string, that is equivalent to the hash:
|
1800
1800
|
* { :value => <string value>, :type => 0, :format => 0 }
|
@@ -1940,7 +1940,7 @@ pgconn_send_prepare(int argc, VALUE *argv, VALUE self)
|
|
1940
1940
|
* SQL query. Each element of the +params+ array may be either:
|
1941
1941
|
* a hash of the form:
|
1942
1942
|
* {:value => String (value of bind parameter)
|
1943
|
-
* :format =>
|
1943
|
+
* :format => Fixnum (0 for text, 1 for binary)
|
1944
1944
|
* }
|
1945
1945
|
* or, it may be a String. If it is a string, that is equivalent to the hash:
|
1946
1946
|
* { :value => <string value>, :format => 0 }
|
@@ -2724,7 +2724,7 @@ pgconn_get_copy_data(int argc, VALUE *argv, VALUE self )
|
|
2724
2724
|
|
2725
2725
|
/*
|
2726
2726
|
* call-seq:
|
2727
|
-
* conn.set_error_verbosity( verbosity ) ->
|
2727
|
+
* conn.set_error_verbosity( verbosity ) -> Fixnum
|
2728
2728
|
*
|
2729
2729
|
* Sets connection's verbosity to _verbosity_ and returns
|
2730
2730
|
* the previous setting. Available settings are:
|
@@ -3280,7 +3280,7 @@ pgconn_ssl_attribute_names(VALUE self)
|
|
3280
3280
|
|
3281
3281
|
/*
|
3282
3282
|
* call-seq:
|
3283
|
-
* conn.lo_creat( [mode] ) ->
|
3283
|
+
* conn.lo_creat( [mode] ) -> Fixnum
|
3284
3284
|
*
|
3285
3285
|
* Creates a large object with mode _mode_. Returns a large object Oid.
|
3286
3286
|
* On failure, it raises PG::Error.
|
@@ -3307,7 +3307,7 @@ pgconn_locreat(int argc, VALUE *argv, VALUE self)
|
|
3307
3307
|
|
3308
3308
|
/*
|
3309
3309
|
* call-seq:
|
3310
|
-
* conn.lo_create( oid ) ->
|
3310
|
+
* conn.lo_create( oid ) -> Fixnum
|
3311
3311
|
*
|
3312
3312
|
* Creates a large object with oid _oid_. Returns the large object Oid.
|
3313
3313
|
* On failure, it raises PG::Error.
|
@@ -3328,7 +3328,7 @@ pgconn_locreate(VALUE self, VALUE in_lo_oid)
|
|
3328
3328
|
|
3329
3329
|
/*
|
3330
3330
|
* call-seq:
|
3331
|
-
* conn.lo_import(file) ->
|
3331
|
+
* conn.lo_import(file) -> Fixnum
|
3332
3332
|
*
|
3333
3333
|
* Import a file to a large object. Returns a large object Oid.
|
3334
3334
|
*
|
@@ -3373,7 +3373,7 @@ pgconn_loexport(VALUE self, VALUE lo_oid, VALUE filename)
|
|
3373
3373
|
|
3374
3374
|
/*
|
3375
3375
|
* call-seq:
|
3376
|
-
* conn.lo_open( oid, [mode] ) ->
|
3376
|
+
* conn.lo_open( oid, [mode] ) -> Fixnum
|
3377
3377
|
*
|
3378
3378
|
* Open a large object of _oid_. Returns a large object descriptor
|
3379
3379
|
* instance on success. The _mode_ argument specifies the mode for
|
@@ -3404,7 +3404,7 @@ pgconn_loopen(int argc, VALUE *argv, VALUE self)
|
|
3404
3404
|
|
3405
3405
|
/*
|
3406
3406
|
* call-seq:
|
3407
|
-
* conn.lo_write( lo_desc, buffer ) ->
|
3407
|
+
* conn.lo_write( lo_desc, buffer ) -> Fixnum
|
3408
3408
|
*
|
3409
3409
|
* Writes the string _buffer_ to the large object _lo_desc_.
|
3410
3410
|
* Returns the number of bytes written.
|
@@ -3471,7 +3471,7 @@ pgconn_loread(VALUE self, VALUE in_lo_desc, VALUE in_len)
|
|
3471
3471
|
|
3472
3472
|
/*
|
3473
3473
|
* call-seq:
|
3474
|
-
* conn.lo_lseek( lo_desc, offset, whence ) ->
|
3474
|
+
* conn.lo_lseek( lo_desc, offset, whence ) -> Fixnum
|
3475
3475
|
*
|
3476
3476
|
* Move the large object pointer _lo_desc_ to offset _offset_.
|
3477
3477
|
* Valid values for _whence_ are +SEEK_SET+, +SEEK_CUR+, and +SEEK_END+.
|
@@ -3493,7 +3493,7 @@ pgconn_lolseek(VALUE self, VALUE in_lo_desc, VALUE offset, VALUE whence)
|
|
3493
3493
|
|
3494
3494
|
/*
|
3495
3495
|
* call-seq:
|
3496
|
-
* conn.lo_tell( lo_desc ) ->
|
3496
|
+
* conn.lo_tell( lo_desc ) -> Fixnum
|
3497
3497
|
*
|
3498
3498
|
* Returns the current position of the large object _lo_desc_.
|
3499
3499
|
*/
|
data/ext/pg_result.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* pg_result.c - PG::Result class extension
|
3
|
-
* $Id$
|
3
|
+
* $Id: pg_result.c,v 982082c0d77b 2016/01/31 19:28:55 ged $
|
4
4
|
*
|
5
5
|
*/
|
6
6
|
|
@@ -302,7 +302,7 @@ static void pgresult_init_fnames(VALUE self)
|
|
302
302
|
|
303
303
|
/*
|
304
304
|
* call-seq:
|
305
|
-
* res.result_status() ->
|
305
|
+
* res.result_status() -> Fixnum
|
306
306
|
*
|
307
307
|
* Returns the status of the query. The status value is one of:
|
308
308
|
* * +PGRES_EMPTY_QUERY+
|
@@ -414,7 +414,7 @@ pgresult_error_field(VALUE self, VALUE field)
|
|
414
414
|
|
415
415
|
/*
|
416
416
|
* call-seq:
|
417
|
-
* res.ntuples() ->
|
417
|
+
* res.ntuples() -> Fixnum
|
418
418
|
*
|
419
419
|
* Returns the number of tuples in the query result.
|
420
420
|
*/
|
@@ -466,7 +466,7 @@ pgresult_fname(VALUE self, VALUE index)
|
|
466
466
|
|
467
467
|
/*
|
468
468
|
* call-seq:
|
469
|
-
* res.fnumber( name ) ->
|
469
|
+
* res.fnumber( name ) -> Fixnum
|
470
470
|
*
|
471
471
|
* Returns the index of the field specified by the string +name+.
|
472
472
|
* The given +name+ is treated like an identifier in an SQL command, that is,
|
@@ -527,7 +527,7 @@ pgresult_ftable(VALUE self, VALUE column_number)
|
|
527
527
|
|
528
528
|
/*
|
529
529
|
* call-seq:
|
530
|
-
* res.ftablecol( column_number ) ->
|
530
|
+
* res.ftablecol( column_number ) -> Fixnum
|
531
531
|
*
|
532
532
|
* Returns the column number (within its table) of the table from
|
533
533
|
* which the column _column_number_ is made up.
|
@@ -552,7 +552,7 @@ pgresult_ftablecol(VALUE self, VALUE column_number)
|
|
552
552
|
|
553
553
|
/*
|
554
554
|
* call-seq:
|
555
|
-
* res.fformat( column_number ) ->
|
555
|
+
* res.fformat( column_number ) -> Fixnum
|
556
556
|
*
|
557
557
|
* Returns the format (0 for text, 1 for binary) of column
|
558
558
|
* _column_number_.
|
@@ -696,7 +696,7 @@ pgresult_getisnull(VALUE self, VALUE tup_num, VALUE field_num)
|
|
696
696
|
|
697
697
|
/*
|
698
698
|
* call-seq:
|
699
|
-
* res.getlength( tup_num, field_num ) ->
|
699
|
+
* res.getlength( tup_num, field_num ) -> Fixnum
|
700
700
|
*
|
701
701
|
* Returns the (String) length of the field in bytes.
|
702
702
|
*
|
@@ -721,7 +721,7 @@ pgresult_getlength(VALUE self, VALUE tup_num, VALUE field_num)
|
|
721
721
|
|
722
722
|
/*
|
723
723
|
* call-seq:
|
724
|
-
* res.nparams() ->
|
724
|
+
* res.nparams() -> Fixnum
|
725
725
|
*
|
726
726
|
* Returns the number of parameters of a prepared statement.
|
727
727
|
* Only useful for the result returned by conn.describePrepared
|
data/ext/pg_text_decoder.c
CHANGED
data/ext/pg_text_encoder.c
CHANGED
data/ext/pg_type_map.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* pg_column_map.c - PG::ColumnMap class extension
|
3
|
-
* $Id$
|
3
|
+
* $Id: pg_type_map.c,v fcf731d3dff7 2015/09/08 12:25:06 jfali $
|
4
4
|
*
|
5
5
|
*/
|
6
6
|
|
@@ -11,53 +11,46 @@ VALUE rb_mDefaultTypeMappable;
|
|
11
11
|
static ID s_id_fit_to_query;
|
12
12
|
static ID s_id_fit_to_result;
|
13
13
|
|
14
|
-
NORETURN( VALUE
|
15
|
-
pg_typemap_fit_to_result( VALUE self, VALUE result ));
|
16
|
-
NORETURN( VALUE
|
17
|
-
pg_typemap_fit_to_query( VALUE self, VALUE params ));
|
18
|
-
NORETURN( int
|
19
|
-
pg_typemap_fit_to_copy_get( VALUE self ));
|
20
|
-
NORETURN( VALUE
|
21
|
-
pg_typemap_result_value( t_typemap *p_typemap, VALUE result, int tuple, int field ));
|
22
|
-
NORETURN( t_pg_coder *
|
23
|
-
pg_typemap_typecast_query_param( t_typemap *p_typemap, VALUE param_value, int field ));
|
24
|
-
NORETURN( VALUE
|
25
|
-
pg_typemap_typecast_copy_get( t_typemap *p_typemap, VALUE field_str, int fieldno, int format, int enc_idx ));
|
26
|
-
|
27
14
|
VALUE
|
28
15
|
pg_typemap_fit_to_result( VALUE self, VALUE result )
|
29
16
|
{
|
30
17
|
rb_raise( rb_eNotImpError, "type map %s is not suitable to map result values", rb_obj_classname(self) );
|
18
|
+
return Qnil;
|
31
19
|
}
|
32
20
|
|
33
21
|
VALUE
|
34
22
|
pg_typemap_fit_to_query( VALUE self, VALUE params )
|
35
23
|
{
|
36
24
|
rb_raise( rb_eNotImpError, "type map %s is not suitable to map query params", rb_obj_classname(self) );
|
25
|
+
return Qnil;
|
37
26
|
}
|
38
27
|
|
39
28
|
int
|
40
29
|
pg_typemap_fit_to_copy_get( VALUE self )
|
41
30
|
{
|
42
31
|
rb_raise( rb_eNotImpError, "type map %s is not suitable to map get_copy_data results", rb_obj_classname(self) );
|
32
|
+
return Qnil;
|
43
33
|
}
|
44
34
|
|
45
35
|
VALUE
|
46
36
|
pg_typemap_result_value( t_typemap *p_typemap, VALUE result, int tuple, int field )
|
47
37
|
{
|
48
38
|
rb_raise( rb_eNotImpError, "type map is not suitable to map result values" );
|
39
|
+
return Qnil;
|
49
40
|
}
|
50
41
|
|
51
42
|
t_pg_coder *
|
52
43
|
pg_typemap_typecast_query_param( t_typemap *p_typemap, VALUE param_value, int field )
|
53
44
|
{
|
54
45
|
rb_raise( rb_eNotImpError, "type map is not suitable to map query params" );
|
46
|
+
return NULL;
|
55
47
|
}
|
56
48
|
|
57
49
|
VALUE
|
58
50
|
pg_typemap_typecast_copy_get( t_typemap *p_typemap, VALUE field_str, int fieldno, int format, int enc_idx )
|
59
51
|
{
|
60
52
|
rb_raise( rb_eNotImpError, "type map is not suitable to map get_copy_data results" );
|
53
|
+
return Qnil;
|
61
54
|
}
|
62
55
|
|
63
56
|
const struct pg_typemap_funcs pg_typemap_funcs = {
|