module Sequel::Postgres::DatasetMethods::PreparedStatementMethods
Shared methods for prepared statements when used with PostgreSQL databases.
Public Instance Methods
prepared_sql()
click to toggle source
Calls superclass method
# File lib/sequel/adapters/shared/postgres.rb, line 1209 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.
Calls superclass method
# File lib/sequel/adapters/shared/postgres.rb, line 1201 def run if @prepared_type == :insert fetch_rows(prepared_sql){|r| return r.values.first} else super end end