Module: DatabaseRecorder::PG::ConnectionExt
- Defined in:
- lib/database_recorder/pg/connection_ext.rb
Instance Method Summary collapse
- #async_exec(sql) ⇒ Object
- #exec(*args) ⇒ Object
- #exec_params(*args) ⇒ Object
- #exec_prepared(*args) ⇒ Object
- #prepare(*args) ⇒ Object
- #query(*args) ⇒ Object
- #sync_exec(sql) ⇒ Object
Instance Method Details
#async_exec(sql) ⇒ Object
6 7 8 9 10 |
# File 'lib/database_recorder/pg/connection_ext.rb', line 6 def async_exec(sql) Recorder.store_query(sql: sql, source: :async_exec) do super end end |
#exec(*args) ⇒ Object
18 19 20 21 22 |
# File 'lib/database_recorder/pg/connection_ext.rb', line 18 def exec(*args) Recorder.store_query(sql: args[0], source: :exec) do super end end |
#exec_params(*args) ⇒ Object
24 25 26 27 28 |
# File 'lib/database_recorder/pg/connection_ext.rb', line 24 def exec_params(*args) Recorder.store_query(sql: args[0], binds: args[1], source: :exec_params) do super end end |
#exec_prepared(*args) ⇒ Object
30 31 32 33 34 |
# File 'lib/database_recorder/pg/connection_ext.rb', line 30 def exec_prepared(*args) Recorder.store_prepared_statement(name: args[0], binds: args[1], source: :exec_prepared) do super end end |
#prepare(*args) ⇒ Object
36 37 38 39 40 |
# File 'lib/database_recorder/pg/connection_ext.rb', line 36 def prepare(*args) Recorder.prepare_statement(name: args[0], sql: args[1], source: :prepare) do super end end |
#query(*args) ⇒ Object
42 43 44 45 46 |
# File 'lib/database_recorder/pg/connection_ext.rb', line 42 def query(*args) Recorder.store_query(sql: args[0], source: :query) do super end end |
#sync_exec(sql) ⇒ Object
12 13 14 15 16 |
# File 'lib/database_recorder/pg/connection_ext.rb', line 12 def sync_exec(sql) Recorder.store_query(sql: sql, source: :sync_exec) do super end end |