abstract class Avram::Database
- Avram::Database
- Reference
- Object
Defined in:
avram/database.crClass Method Summary
-
.rollback
Rollback the current transaction
- .run(&)
-
.transaction(&)
Wrap the block in a database transaction
- .transactions
-
.truncate
Run a SQL
TRUNCATE
on all tables in the database - .url
Instance Method Summary
- #select_rows(statement)
- #table_columns(table_name)
- #table_names
- #tables_with_schema(excluding : String)
Instance methods inherited from class Object
blank_for_validates_required? : Bool
blank_for_validates_required?
Class Method Detail
def self.transaction(&)
#
Wrap the block in a database transaction
AppDatabase.transaction do
# Create, read, update
# Force a rollback with AppDatabase.rollback
end