Class/Module Index [+]

Quicksearch

Sequel::Postgres::DatasetMethods::PreparedStatementMethods

Shared methods for prepared statements when used with PostgreSQL databases.

Public Instance Methods

prepared_sql() click to toggle source
# File lib/sequel/adapters/shared/postgres.rb, line 1096
def prepared_sql
  return @prepared_sql if @prepared_sql
  @opts[:returning] = insert_pk if @prepared_type == :insert
  super
  @prepared_sql
end
run() click to toggle source

Override insert action to use RETURNING if the server supports it.

# File lib/sequel/adapters/shared/postgres.rb, line 1088
def run
  if @prepared_type == :insert
    fetch_rows(prepared_sql){|r| return r.values.first}
  else
    super
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.