Skip to content

Commit

Permalink
Add PG::RowCoder for en/decoding of Composite Types
Browse files Browse the repository at this point in the history
This implements proper encoder and decoder for Composite Types
as described in https://www.postgresql.org/docs/11/rowtypes.html
and as requested in https://bitbucket.org/ged/ruby-pg/issues/258

This adds the following classes:
* PG::RowCoder < PG::Coder
* PG::RowEncoder < PG::RowCoder
* PG::RowDecoder < PG::RowCoder
* PG::TextEncoder::Row < PG::RowEncoder
* PG::TextDecoder::Row < PG::RowDecoder

Fixes #258
  • Loading branch information
larskanis committed Oct 4, 2019
1 parent 6f7136d commit c13fb88
Show file tree
Hide file tree
Showing 6 changed files with 557 additions and 1 deletion.
1 change: 1 addition & 0 deletions Manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ ext/pg_connection.c
ext/pg_copy_coder.c
ext/pg_errors.c
ext/pg_result.c
ext/pg_row_coder.c
ext/pg_text_decoder.c
ext/pg_text_encoder.c
ext/pg_tuple.c
Expand Down
1 change: 1 addition & 0 deletions ext/pg.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,7 @@ Init_pg_ext()
init_pg_binary_encoder();
init_pg_binary_decoder();
init_pg_copycoder();
init_pg_rowcoder();
init_pg_tuple();
}

1 change: 1 addition & 0 deletions ext/pg.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ void init_pg_type_map_by_oid _(( void ));
void init_pg_type_map_in_ruby _(( void ));
void init_pg_coder _(( void ));
void init_pg_copycoder _(( void ));
void init_pg_rowcoder _(( void ));
void init_pg_text_encoder _(( void ));
void init_pg_text_decoder _(( void ));
void init_pg_binary_encoder _(( void ));
Expand Down
Loading

0 comments on commit c13fb88

Please sign in to comment.