Sha256: 6b3474d4a1a6983d47ddb462295032edb4c3a7f487a92ba811033c8343dbc61a

Contents?: true

Size: 856 Bytes

Versions: 4

Compression:

Stored size: 856 Bytes

Contents

# coding: utf-8

module Sequel
    class JDBC::Database
        def metadata_schema_and_table(table, opts)
            im = input_identifier_meth(opts[:dataset])
            schema, table = schema_and_table(table)
            schema ||= default_schema
            schema ||= opts[:schema]
            schema = im.call(schema) if schema
            table = im.call(table)
            [schema, table]
        end
    end

    module JDBC::AS400::DatabaseMethods
        IDENTITY_VAL_LOCAL ||= "SELECT IDENTITY_VAL_LOCAL() FROM SYSIBM.SYSDUMMY1".freeze
        def last_insert_id(conn, opts=OPTS)
          statement(conn) do |stmt|
            sql = IDENTITY_VAL_LOCAL
            rs = log_yield(sql){stmt.executeQuery(sql)}
            rs.next
            rs.getInt(1)
          end
        end
    end if defined?(JDBC::AS400)
end if defined? JRUBY_VERSION

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
engine2-1.0.3 lib/engine2/pre_bootstrap.rb
engine2-1.0.2 lib/engine2/pre_bootstrap.rb
engine2-1.0.1 lib/engine2/pre_bootstrap.rb
engine2-1.0.0 lib/engine2/pre_bootstrap.rb