Sha256: 23f3a0d122183ae390a2c77da98b8d3ff1692e3ca542c8b41ef1b7c80aa9cdb0

Contents?: true

Size: 725 Bytes

Versions: 1

Compression:

Stored size: 725 Bytes

Contents

java_import "datomic.Peer"

module Dalton
  class TransactionResult
    def initialize(result_map)
      @result_map = result_map
    end

    def db_before
      Dalton::Database.new(@result_map.get(Java::Datomic::Connection.DB_BEFORE))
    end

    def db_after
      Dalton::Database.new(@result_map.get(Java::Datomic::Connection.DB_AFTER))
    end

    def tx_data
      Translation.from_clj(@result_map.get(Java::Datomic::Connection.TX_DATA))
    end

    def raw_tempids
      @result_map.get(Java::Datomic::Connection.TEMPIDS)
    end

    def tempids
      Translation.from_clj(raw_tempids)
    end

    def resolve_tempid(tempid)
      Peer.resolve_tempid(db_after.datomic_db, raw_tempids, tempid)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dalton-0.0.1 lib/dalton/transaction_result.rb