Module: JDBC::AS400::DatabaseMethods
- Defined in:
- lib/engine2/pre_bootstrap.rb
Instance Method Summary collapse
Instance Method Details
#last_insert_id(conn, opts = OPTS) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/engine2/pre_bootstrap.rb', line 19 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 |
#valid_connection_sql ⇒ Object
28 29 30 |
# File 'lib/engine2/pre_bootstrap.rb', line 28 def valid_connection_sql 'select 1 from sysibm.sysdummy1' end |