class Table
Public Class Methods
for_database_id(database_id)
click to toggle source
# File natural-backend/app/models/table.rb, line 12 def self.for_database_id(database_id) # Get the database associated with the database id db = Database.find(database_id) # Get the project asscoiated with this database project = Project.find(db.project_id) db_manager = ::Natural::DatabaseManager.new connection = db_manager.connect_to_database(db.database_identifier) connection.database.tables(project.db_username) end
Private Instance Methods
trigger_table_creation()
click to toggle source
# File natural-backend/app/models/table.rb, line 25 def trigger_table_creation CreateTableJob.perform_later(self) end
trigger_table_destruction()
click to toggle source
# File natural-backend/app/models/table.rb, line 29 def trigger_table_destruction DestroyTableJob.perform_later(database.database_identifier, self.name) end