Module: Pgoutput::Messages
- Defined in:
- lib/pgoutput/messages.rb
Overview
Immutable message model classes for the PostgreSQL pgoutput protocol.
Every value returned by the parser is deeply shareable via Ractor.make_shareable. These classes are protocol-level structures only; they preserve tuple bytes and metadata but do not convert PostgreSQL values into application-specific Ruby types.
Defined Under Namespace
Classes: Begin, Column, Commit, Delete, Insert, Relation, TupleValue, Update
Instance Attribute Summary collapse
-
#columns ⇒ Array<Column>
readonly
Immutable column metadata.
-
#commit_lsn ⇒ Integer
readonly
Commit LSN.
-
#commit_timestamp ⇒ Integer
readonly
Microseconds since PostgreSQL epoch.
-
#final_lsn ⇒ Integer
readonly
Final transaction LSN.
-
#flags ⇒ Integer
readonly
Commit flags; currently unused by PostgreSQL.
-
#format ⇒ :null, ...
readonly
Protocol value format.
-
#name ⇒ String
readonly
Column name.
-
#new_tuple ⇒ Array<TupleValue>
readonly
New tuple data.
-
#oid ⇒ Integer?
readonly
PostgreSQL type OID when relation metadata is known.
-
#old_key_tuple ⇒ Array<TupleValue>?
readonly
Replica identity key tuple.
-
#old_tuple ⇒ Array<TupleValue>?
readonly
Full old tuple when replica identity is FULL.
-
#raw ⇒ String?
readonly
Immutable raw payload, or nil for NULL/TOAST markers.
-
#relation_id ⇒ Integer
readonly
Relation OID.
-
#replica_identity ⇒ Integer
readonly
Relation replica identity setting.
-
#schema ⇒ String
readonly
Namespace name.
-
#table ⇒ String
readonly
Relation name.
-
#transaction_end_lsn ⇒ Integer
readonly
Transaction end LSN.
-
#tuple ⇒ Array<TupleValue>
readonly
New tuple data.
-
#type_modifier ⇒ Integer
readonly
PostgreSQL type modifier.
-
#xid ⇒ Integer
readonly
Transaction id.
Instance Attribute Details
#columns ⇒ Array<Column> (readonly)
Returns immutable column metadata.
47 |
# File 'lib/pgoutput/messages.rb', line 47 Relation = Data.define(:relation_id, :schema, :table, :replica_identity, :columns) |
#commit_lsn ⇒ Integer (readonly)
Returns commit LSN.
104 |
# File 'lib/pgoutput/messages.rb', line 104 Commit = Data.define(:flags, :commit_lsn, :transaction_end_lsn, :commit_timestamp) |
#commit_timestamp ⇒ Integer (readonly)
Returns microseconds since PostgreSQL epoch.
21 |
# File 'lib/pgoutput/messages.rb', line 21 Begin = Data.define(:final_lsn, :commit_timestamp, :xid) |
#final_lsn ⇒ Integer (readonly)
Returns final transaction LSN.
21 |
# File 'lib/pgoutput/messages.rb', line 21 Begin = Data.define(:final_lsn, :commit_timestamp, :xid) |
#flags ⇒ Integer (readonly)
Returns commit flags; currently unused by PostgreSQL.
33 |
# File 'lib/pgoutput/messages.rb', line 33 Column = Data.define(:flags, :name, :oid, :type_modifier) |
#format ⇒ :null, ... (readonly)
Returns protocol value format.
57 |
# File 'lib/pgoutput/messages.rb', line 57 TupleValue = Data.define(:format, :raw, :oid) |
#name ⇒ String (readonly)
Returns column name.
33 |
# File 'lib/pgoutput/messages.rb', line 33 Column = Data.define(:flags, :name, :oid, :type_modifier) |
#new_tuple ⇒ Array<TupleValue> (readonly)
Returns new tuple data.
80 |
# File 'lib/pgoutput/messages.rb', line 80 Update = Data.define(:relation_id, :old_key_tuple, :old_tuple, :new_tuple) |
#oid ⇒ Integer? (readonly)
Returns PostgreSQL type OID when relation metadata is known.
33 |
# File 'lib/pgoutput/messages.rb', line 33 Column = Data.define(:flags, :name, :oid, :type_modifier) |
#old_key_tuple ⇒ Array<TupleValue>? (readonly)
Returns replica identity key tuple.
80 |
# File 'lib/pgoutput/messages.rb', line 80 Update = Data.define(:relation_id, :old_key_tuple, :old_tuple, :new_tuple) |
#old_tuple ⇒ Array<TupleValue>? (readonly)
Returns full old tuple when replica identity is FULL.
80 |
# File 'lib/pgoutput/messages.rb', line 80 Update = Data.define(:relation_id, :old_key_tuple, :old_tuple, :new_tuple) |
#raw ⇒ String? (readonly)
Returns immutable raw payload, or nil for NULL/TOAST markers.
57 |
# File 'lib/pgoutput/messages.rb', line 57 TupleValue = Data.define(:format, :raw, :oid) |
#relation_id ⇒ Integer (readonly)
Returns relation OID.
47 |
# File 'lib/pgoutput/messages.rb', line 47 Relation = Data.define(:relation_id, :schema, :table, :replica_identity, :columns) |
#replica_identity ⇒ Integer (readonly)
Returns relation replica identity setting.
47 |
# File 'lib/pgoutput/messages.rb', line 47 Relation = Data.define(:relation_id, :schema, :table, :replica_identity, :columns) |
#schema ⇒ String (readonly)
Returns namespace name.
47 |
# File 'lib/pgoutput/messages.rb', line 47 Relation = Data.define(:relation_id, :schema, :table, :replica_identity, :columns) |
#table ⇒ String (readonly)
Returns relation name.
47 |
# File 'lib/pgoutput/messages.rb', line 47 Relation = Data.define(:relation_id, :schema, :table, :replica_identity, :columns) |
#transaction_end_lsn ⇒ Integer (readonly)
Returns transaction end LSN.
104 |
# File 'lib/pgoutput/messages.rb', line 104 Commit = Data.define(:flags, :commit_lsn, :transaction_end_lsn, :commit_timestamp) |
#tuple ⇒ Array<TupleValue> (readonly)
Returns new tuple data.
65 |
# File 'lib/pgoutput/messages.rb', line 65 Insert = Data.define(:relation_id, :tuple) |
#type_modifier ⇒ Integer (readonly)
Returns PostgreSQL type modifier.
33 |
# File 'lib/pgoutput/messages.rb', line 33 Column = Data.define(:flags, :name, :oid, :type_modifier) |
#xid ⇒ Integer (readonly)
Returns transaction id.
21 |
# File 'lib/pgoutput/messages.rb', line 21 Begin = Data.define(:final_lsn, :commit_timestamp, :xid) |