abstract class Avram::Database

Defined in:

avram/database.cr

Class Method Summary

Instance Method Summary

Instance methods inherited from class Object

blank_for_validates_required? : Bool blank_for_validates_required?

Class Method Detail

def self.rollback #

Rollback the current transaction


[View source]
def self.run(&) #

[View source]
def self.transaction(&) #

Wrap the block in a database transaction

AppDatabase.transaction do
  # Create, read, update
  # Force a rollback with AppDatabase.rollback
end

[View source]
def self.transactions #

[View source]
def self.truncate #

Run a SQL TRUNCATE on all tables in the database


[View source]
def self.url #

[View source]

Instance Method Detail

def select_rows(statement) #

[View source]
def table_columns(table_name) #

[View source]
def table_names #

[View source]
def tables_with_schema(excluding : String) #

[View source]