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_typeObject



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

Returns:

  • (Boolean)


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

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

#server_versionObject



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