Class 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 789
789:         def prepared_sql
790:           return @prepared_sql if @prepared_sql
791:           @opts[:returning] = insert_pk if @prepared_type == :insert
792:           super
793:           @prepared_sql
794:         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 781
781:         def run
782:           if @prepared_type == :insert
783:             fetch_rows(prepared_sql){|r| return r.values.first}
784:           else
785:             super
786:           end
787:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.