abstract class Focus::Database
- Focus::Database
- Reference
- Object
Direct Known Subclasses
Defined in:
focus/database.crConstructors
- .connect(url : String) : Database
- .connect(db : DB::Database) : Database
- .new(raw_db : DB::Database)
Instance Method Summary
- #close : Nil
- #delete(table : Focus::Table, where : ColumnDeclaring(Bool)) : Int64
- #delete_all(table : Focus::Table) : Int64
- #execute_insert_and_return_generated_key(expression : Focus::InsertExpression, column : Focus::BaseColumn) : DB::ResultSet
- #execute_query(expression : Focus::SqlExpression) : DB::ResultSet
- #execute_update(expression : Focus::SqlExpression) : Int64
- #format_expression(expression : Focus::SqlExpression) : Tuple(String, Array(Focus::BaseArgumentExpression))
- #from(table : Focus::Table) : Focus::QuerySource
- #insert(table : Focus::Table, &) : Int64
- #insert_returning_generated_key(table : Focus::Table, column : Focus::Column(T), &) : T forall T
- #setup_connection(&block : DB::Connection -> _)
- #update(table : Focus::Table, &) : Int64
- #with_connection(&block : DB::Connection -> T) : T forall T
- #with_transaction(&block : DB::Transaction -> T) : T | Nil forall T
Constructor Detail
Instance Method Detail
abstract
def execute_insert_and_return_generated_key(expression : Focus::InsertExpression, column : Focus::BaseColumn) : DB::ResultSet
#
abstract
def format_expression(expression : Focus::SqlExpression) : Tuple(String, Array(Focus::BaseArgumentExpression))
#
def insert_returning_generated_key(table : Focus::Table, column : Focus::Column(T), &) : T forall T
#