Method: Sequel::IBMDB::Database#execute_insert
- Defined in:
- lib/sequel/adapters/ibmdb.rb
#execute_insert(sql, opts = OPTS) ⇒ Object
219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/sequel/adapters/ibmdb.rb', line 219 def execute_insert(sql, opts=OPTS) synchronize(opts[:server]) do |c| if sql.is_a?(Symbol) execute_prepared_statement(sql, opts) else _execute(c, sql, opts) end _execute(c, "SELECT IDENTITY_VAL_LOCAL() FROM SYSIBM.SYSDUMMY1", opts){|stmt| i = stmt.fetch_array.first.to_i; i} end rescue Connection::Error => e raise_error(e) end |