Class: AppMap::Handler::Rails::SQLHandler::SQLExaminer::SequelExaminer
- Defined in:
- lib/appmap/handler/rails/sql_handler.rb
Instance Method Summary collapse
- #database_type ⇒ Object
- #execute_query(sql) ⇒ Object
- #in_transaction? ⇒ Boolean
- #server_version ⇒ Object
Instance Method Details
#database_type ⇒ Object
100 101 102 |
# File 'lib/appmap/handler/rails/sql_handler.rb', line 100 def database_type Sequel::Model.db.database_type.to_sym end |
#execute_query(sql) ⇒ Object
108 109 110 |
# File 'lib/appmap/handler/rails/sql_handler.rb', line 108 def execute_query(sql) Sequel::Model.db[sql].all end |
#in_transaction? ⇒ Boolean
104 105 106 |
# File 'lib/appmap/handler/rails/sql_handler.rb', line 104 def in_transaction? Sequel::Model.db.in_transaction? end |
#server_version ⇒ Object
94 95 96 97 98 |
# File 'lib/appmap/handler/rails/sql_handler.rb', line 94 def server_version # Queries the database, therefore this is pretty unsafe to do inside of a hook. # As a result, this is not being used at the moment. Sequel::Model.db.server_version end |