Sha256: 042ccd21621ac8517adaec9832d43bd1de904457a27687c3b153ae550c2d719a

Contents?: true

Size: 721 Bytes

Versions: 15

Compression:

Stored size: 721 Bytes

Contents

module DataObjects

  module Postgres

    class Transaction < DataObjects::Transaction

      def begin
        cmd = "BEGIN"
        connection.create_command(cmd).execute_non_query
      end

      def commit
        cmd = "COMMIT PREPARED '#{id}'"
        connection.create_command(cmd).execute_non_query
      end

      def rollback
        cmd = "ROLLBACK"
        connection.create_command(cmd).execute_non_query
      end

      def rollback_prepared
        cmd = "ROLLBACK PREPARED '#{id}'"
        connection.create_command(cmd).execute_non_query
      end

      def prepare
        cmd = "PREPARE TRANSACTION '#{id}'"
        connection.create_command(cmd).execute_non_query
      end

    end

  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
do_postgres-0.9.11 lib/do_postgres/transaction.rb
do_postgres-0.9.12-x86-mingw32 lib/do_postgres/transaction.rb
do_postgres-0.9.10 lib/do_postgres/transaction.rb
do_postgres-0.9.12-java lib/do_postgres/transaction.rb
do_postgres-0.9.10.1 lib/do_postgres/transaction.rb
do_postgres-0.9.12 lib/do_postgres/transaction.rb
do_postgres-0.9.12-x86-mswin32-60 lib/do_postgres/transaction.rb
do_postgres-0.9.2 lib/do_postgres/transaction.rb
do_postgres-0.9.3 lib/do_postgres/transaction.rb
do_postgres-0.9.4 lib/do_postgres/transaction.rb
do_postgres-0.9.7 lib/do_postgres/transaction.rb
do_postgres-0.9.5 lib/do_postgres/transaction.rb
do_postgres-0.9.6 lib/do_postgres/transaction.rb
do_postgres-0.9.8 lib/do_postgres/transaction.rb
do_postgres-0.9.9 lib/do_postgres/transaction.rb