Module: XID::ConnectionAdapters::PostgreSQLAdapter

Defined in:
lib/xid/connection_adapters/postgresql_adapter.rb

Instance Method Summary collapse

Instance Method Details

#select_transaction_idObject

From the PostgreSQL manual: www.postgresql.org/docs/9.1/static/functions-info.html#FUNCTIONS-TXID-SNAPSHOT

The internal transaction ID type (xid) is 32 bits wide and wraps around every
4 billion transactions. However, these functions export a 64-bit format that
is extended with an "epoch" counter so it will not wrap around during the 
life of an installation.


17
18
19
# File 'lib/xid/connection_adapters/postgresql_adapter.rb', line 17

def select_transaction_id
  select_value('SELECT txid_current()')
end

#supports_transaction_id?Boolean



5
6
7
# File 'lib/xid/connection_adapters/postgresql_adapter.rb', line 5

def supports_transaction_id?
  true
end