Add the primary_keys and primary_key_sequences instance variables, so we can get the correct return values for inserted rows.
# File lib/sequel/adapters/swift/postgres.rb, line 37 def self.extended(db) db.instance_eval do @primary_keys = {} @primary_key_sequences = {} end end
Run the SELECT SQL on the database and yield the rows
# File lib/sequel/adapters/swift/postgres.rb, line 45 def execute(sql, opts={}) synchronize(opts[:server]) do |conn| begin res = conn.execute(sql) yield res if block_given? nil rescue SwiftError => e raise_error(e) end end end
Run the DELETE/UPDATE SQL on the database and return the number of matched rows.
# File lib/sequel/adapters/swift/postgres.rb, line 59 def execute_dui(sql, opts={}) synchronize(opts[:server]) do |conn| begin conn.execute(sql).rows rescue SwiftError => e raise_error(e) end end end
Run the INSERT SQL on the database and return the primary key for the record.
# File lib/sequel/adapters/swift/postgres.rb, line 71 def execute_insert(sql, opts={}) synchronize(opts[:server]) do |conn| begin conn.execute(sql) insert_result(conn, opts[:table], opts[:values]) rescue SwiftError => e raise_error(e) end end end
Generated with the Darkfish Rdoc Generator 2.