Execute the given type of statement with the hash of values.
# File lib/sequel/adapters/oracle.rb, line 361 def call(type, bind_vars={}, *values, &block) ps = to_prepared_statement(type, values) ps.extend(BindArgumentMethods) ps.call(bind_vars, &block) end
# File lib/sequel/adapters/oracle.rb, line 380 def fetch_rows(sql) execute(sql) do |cursor| offset = @opts[:offset] rn = row_number_column cps = db.conversion_procs cols = columns = cursor.get_col_names.map{|c| output_identifier(c)} metadata = cursor.column_metadata cm = cols.zip(metadata).map{|c, m| [c, cps[m.data_type]]} columns = cols.reject{|x| x == rn} if offset @columns = columns while r = cursor.fetch row = {} r.zip(cm).each{|v, (c, cp)| row[c] = ((v && cp) ? cp.call(v) : v)} row.delete(rn) if offset yield row end end self end
Prepare the given type of query with the given name and store it in the database. Note that a new native prepared statement is created on each call to this prepared statement.
# File lib/sequel/adapters/oracle.rb, line 370 def prepare(type, name=nil, *values) ps = to_prepared_statement(type, values) ps.extend(PreparedStatementMethods) if name ps.prepared_statement_name = name db.prepared_statements[name] = ps end ps end
Oracle requires type specifiers for placeholders, at least if you ever want to use a nil/NULL value as the value for the placeholder.
# File lib/sequel/adapters/oracle.rb, line 415 def requires_placeholder_type_specifiers? true end
Generated with the Darkfish Rdoc Generator 2.