Module: Sequel::JDBC::Postgres::AdapterMethods
- Includes:
- Postgres::AdapterMethods
- Defined in:
- lib/sequel/adapters/jdbc/postgresql.rb
Overview
Methods to add to the JDBC adapter/connection to allow it to work with the shared PostgreSQL code.
Constant Summary
Constants included from Postgres::AdapterMethods
Postgres::AdapterMethods::SELECT_CURRVAL, Postgres::AdapterMethods::SELECT_CUSTOM_SEQUENCE, Postgres::AdapterMethods::SELECT_PK, Postgres::AdapterMethods::SELECT_SERIAL_SEQUENCE
Instance Attribute Summary
Attributes included from Postgres::AdapterMethods
Instance Method Summary collapse
-
#execute(sql, args = nil) ⇒ Object
Give the JDBC adapter a direct execute method, which creates a statement with the given sql and executes it.
Methods included from Postgres::AdapterMethods
#apply_connection_settings, #last_insert_id, #primary_key, #sequence
Instance Method Details
#execute(sql, args = nil) ⇒ Object
Give the JDBC adapter a direct execute method, which creates a statement with the given sql and executes it.
17 18 19 20 21 22 23 |
# File 'lib/sequel/adapters/jdbc/postgresql.rb', line 17 def execute(sql, args=nil) method = block_given? ? :executeQuery : :execute @db.send(:statement, self) do |stmt| rows = @db.log_yield(sql){stmt.send(method, sql)} yield(rows) if block_given? end end |