Class/Module Index [+]

Quicksearch

Sequel::Oracle::Dataset

Public Instance Methods

call(type, bind_vars={}, *values, &block) click to toggle source

Execute the given type of statement with the hash of values.

# File lib/sequel/adapters/oracle.rb, line 400
def call(type, bind_vars={}, *values, &block)
  ps = to_prepared_statement(type, values)
  ps.extend(BindArgumentMethods)
  ps.call(bind_vars, &block)
end
fetch_rows(sql) click to toggle source
# File lib/sequel/adapters/oracle.rb, line 406
def fetch_rows(sql)
  execute(sql) do |cursor|
    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 = columns
    while r = cursor.fetch
      row = {}
      r.zip(cm).each{|v, (c, cp)| row[c] = ((v && cp) ? cp.call(v) : v)}
      yield row
    end
  end
  self
end
prepare(type, name=nil, *values) click to toggle source

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 425
def prepare(type, name=nil, *values)
  ps = to_prepared_statement(type, values)
  ps.extend(PreparedStatementMethods)
  if name
    ps.prepared_statement_name = name
    db.set_prepared_statement(name, ps)
  end
  ps
end
requires_placeholder_type_specifiers?() click to toggle source

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 438
def requires_placeholder_type_specifiers?
  true
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.