Skip to content

Commit 2bf7ab1

Browse files
committed
Merge branch 'master' of github.com:ged/ruby-pg
2 parents 824497c + 913d75d commit 2bf7ab1

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

History.rdoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
== v1.2.1 [2020-01-02] Michael Granger <[email protected]>
2+
3+
Enhancements:
4+
5+
- Added internal API for sequel_pg compatibility.
6+
7+
18
== v1.2.0 [2019-12-20] Michael Granger <[email protected]>
29

310
Repository:

README.rdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ PG::Coder objects can be used to set up a PG::TypeMap or alternatively
118118
to convert single values to/from their string representation.
119119

120120
The following PostgreSQL column types are supported by ruby-pg (TE = Text Encoder, TD = Text Decoder, BE = Binary Encoder, BD = Binary Decoder):
121-
* Integer: {TE}[rdoc-ref:PG::TextEncoder::Integer], {TD}[rdoc-ref:PG::TextDecoder::Integer], {BD}[rdoc-ref:PG::BinaryDecoder::Integer]
121+
* Integer: {TE}[rdoc-ref:PG::TextEncoder::Integer], {TD}[rdoc-ref:PG::TextDecoder::Integer], {BD}[rdoc-ref:PG::BinaryDecoder::Integer] 💡 No links? Switch to {here}[https://deveiate.org/code/pg/README_rdoc.html#label-Type+Casts] 💡
122122
* BE: {Int2}[rdoc-ref:PG::BinaryEncoder::Int2], {Int4}[rdoc-ref:PG::BinaryEncoder::Int4], {Int8}[rdoc-ref:PG::BinaryEncoder::Int8]
123123
* Float: {TE}[rdoc-ref:PG::TextEncoder::Float], {TD}[rdoc-ref:PG::TextDecoder::Float], {BD}[rdoc-ref:PG::BinaryDecoder::Float]
124124
* Numeric: {TE}[rdoc-ref:PG::TextEncoder::Numeric], {TD}[rdoc-ref:PG::TextDecoder::Numeric]

ext/pg_result.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@ static const rb_data_type_t pgresult_type = {
167167
#endif
168168
};
169169

170+
/* Needed by sequel_pg gem, do not delete */
171+
int pg_get_result_enc_idx(VALUE self)
172+
{
173+
return pgresult_get_this(self)->enc_idx;
174+
}
170175

171176
/*
172177
* Global functions
@@ -333,8 +338,7 @@ pg_result_check( VALUE self )
333338
* Special care must be taken when PG::Tuple objects are used.
334339
* In this case #clear must not be called unless all PG::Tuple objects of this result are fully materialized.
335340
*
336-
* If PG::Result#autoclear? is true then the result is marked as cleared
337-
* and the underlying C struct will be cleared automatically by libpq.
341+
* If PG::Result#autoclear? is +true+ then the result is only marked as cleared but clearing the underlying C struct will happen when the callback returns.
338342
*
339343
*/
340344
VALUE
@@ -362,8 +366,10 @@ pgresult_cleared_p( VALUE self )
362366
* call-seq:
363367
* res.autoclear? -> boolean
364368
*
365-
* Returns +true+ if the underlying C struct will be cleared automatically by libpq.
366-
* Elsewise the result is cleared by PG::Result#clear or by the GC when it's no longer in use.
369+
* Returns +true+ if the underlying C struct will be cleared at the end of a callback.
370+
* This applies only to Result objects received by the block to PG::Cinnection#set_notice_receiver .
371+
*
372+
* All other Result objects are automatically cleared by the GC when the object is no longer in use or manually by PG::Result#clear .
367373
*
368374
*/
369375
VALUE

lib/pg.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
module PG
3838

3939
# Library version
40-
VERSION = '1.2.0'
40+
VERSION = '1.2.1'
4141

4242
# VCS revision
4343
REVISION = %q$Revision: 6f611e78845a $

0 commit comments

Comments
 (0)