Module | Sequel::Postgres::DatasetMethods::PreparedStatementMethods
In: | lib/sequel/adapters/shared/postgres.rb

Shared methods for prepared statements when used with PostgreSQL databases.

### Methods

prepared_sql run

### Public Instance methods

prepared_sql()

[Source]

         # File lib/sequel/adapters/shared/postgres.rb, line 905
    905:         def prepared_sql
    906:           return @prepared_sql if @prepared_sql
    907:           @opts[:returning] = insert_pk if @prepared_type == :insert
    908:           super
    909:           @prepared_sql
    910:         end

run()

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

[Source]

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

[Validate]