lib/sequel/adapters/postgres.rb
# Insert the values into the table and return the primary key (if
# automatically generated).
Insert the values into the table and return the primary key (if
automatically generated).
Insert the values into the table and return the primary key ( if automatically generated ) .
def execute_insert(sql, opts={})
        return execute(sql, opts) if Symbol === sql
        begin 
          log_info(sql, opts[:arguments])
          synchronize(opts[:server]) do |conn|
            conn.execute(sql, opts[:arguments])
            insert_result(conn, opts[:table], opts[:values])
          end
        rescue => e
          log_info(e.message)
          raise_error(e, :classes=>CONVERTED_EXCEPTIONS)
        end
      end
def execute_insert ( sql , opts = { } ) return execute ( sql , opts ) if Symbol === sql begin log_info ( sql , opts [ :arguments ] ) synchronize ( opts [ :server ] ) do | conn | conn . execute ( sql , opts [ :arguments ] ) insert_result ( conn , opts [ :table ] , opts [ :values ] ) end rescue => e log_info ( e . message ) raise_error ( e , :classes => CONVERTED_EXCEPTIONS ) end end
Insert the values into the table and return the primary key (if
automatically generated).
Insert the values into the table and return the primary key ( if automatically generated ) .
sql
opts