Sha256: 30c3c4874d5560a58eba67cd88339cdfad772e1e9a3038d5055ad7f8662ebb35

Contents?: true

Size: 681 Bytes

Versions: 27

Compression:

Stored size: 681 Bytes

Contents

require 'oci8'
require 'test/unit'
require File.dirname(__FILE__) + '/config'

class TestRowid < Test::Unit::TestCase

  def setup
    @conn = get_oci8_connection
  end

  def test_rowid
    drop_table('test_table')
    sql = <<-EOS
CREATE TABLE test_table (N NUMBER(38))
EOS
    @conn.exec(sql)
    cursor = @conn.parse("INSERT INTO test_table values(1)");
    cursor.exec
    rid1 = cursor.rowid
    assert_instance_of(String, rid1)
    cursor.close
    rid2 = nil
    @conn.exec('select rowid from test_table where rowid = :1', rid1) do |row|
      rid2 = row[0]
    end
    assert_equal(rid2, rid1)
    drop_table('test_table')
  end

  def teardown
    @conn.logoff
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
ruby-oci8-2.1.5.1-x64-mingw32 test/test_rowid.rb
ruby-oci8-2.1.5-x86-mingw32 test/test_rowid.rb
ruby-oci8-2.1.5 test/test_rowid.rb
ruby-oci8-2.1.4-x86-mingw32 test/test_rowid.rb
ruby-oci8-2.1.4 test/test_rowid.rb
ruby-oci8-2.1.3-x86-mingw32 test/test_rowid.rb
ruby-oci8-2.1.3 test/test_rowid.rb
ruby-oci8-2.1.2-x86-mingw32 test/test_rowid.rb
ruby-oci8-2.1.2 test/test_rowid.rb
ruby-oci8-2.1.1-x86-mingw32 test/test_rowid.rb
ruby-oci8-2.1.1 test/test_rowid.rb
ruby-oci8-2.1.0-x86-mingw32 test/test_rowid.rb
ruby-oci8-2.1.0 test/test_rowid.rb
ruby-oci8-master-2.0.7 test/test_rowid.rb
ruby-oci8-2.0.6-x86-mingw32 test/test_rowid.rb
ruby-oci8-2.0.6 test/test_rowid.rb
ruby-oci8-2.0.5-x86-mingw32 test/test_rowid.rb
ruby-oci8-2.0.5 test/test_rowid.rb
ruby-oci8-2.0.4 test/test_rowid.rb
ruby-oci8-2.0.4-x86-mingw32 test/test_rowid.rb