Shared methods for prepared statements when used with PostgreSQL databases.
# File lib/sequel/adapters/shared/postgres.rb, line 703 def prepared_sql return @prepared_sql if @prepared_sql @opts[:returning] = insert_pk if @prepared_type == :insert && supports_insert_select? super @prepared_sql end
Override insert action to use RETURNING if the server supports it.
# File lib/sequel/adapters/shared/postgres.rb, line 695 def run(&block) if @prepared_type == :insert && supports_insert_select? fetch_rows(prepared_sql){|r| return r.values.first} else super end end
Generated with the Darkfish Rdoc Generator 2.