Class: AppMap::Handler::Rails::SQLHandler::SQLExaminer::SequelExaminer

Inherits:
Object
  • Object
show all
Defined in:
lib/appmap/handler/rails/sql_handler.rb

Instance Method Summary collapse

Instance Method Details

#database_type ⇒ Object



99
100
101
# File 'lib/appmap/handler/rails/sql_handler.rb', line 99

def database_type
  Sequel::Model.db.database_type.to_sym
end

#execute_query(sql) ⇒ Object



107
108
109
# File 'lib/appmap/handler/rails/sql_handler.rb', line 107

def execute_query(sql)
  Sequel::Model.db[sql].all
end

#in_transaction? ⇒ Boolean

Returns:

  • (Boolean)


103
104
105
# File 'lib/appmap/handler/rails/sql_handler.rb', line 103

def in_transaction?
  Sequel::Model.db.in_transaction?
end

#server_version ⇒ Object



93
94
95
96
97
# File 'lib/appmap/handler/rails/sql_handler.rb', line 93

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