abstract class Pon::Adapter::RDB
- Pon::Adapter::RDB
- Pon::Adapter
- Reference
- Object
Overview
base class for crystal-db
Direct Known Subclasses
Defined in:
pon/adapter/rdb.crConstant Summary
-
BIND_TYPE =
BindType::Question
-
LAST_VAL =
"SELECT LAST_INSERT_ROWID()"
-
QUOTE =
'"'
-
SETTING = "" # This should be defined in subclasses
-
RawTypes =
{"Bool" => "BOOL", "Float32" => "FLOAT", "Float64" => "REAL", "Int32" => "INT", "Int64" => "BIGINT", "String" => "VARCHAR(255)", "Time" => "TIMESTAMP"}
Instance Method Summary
- #all(fields : Array(String), types, query_string = nil, **opts)
- #count : Int32
-
#databases : Array(String)
odbc
- #delete(key) : Nil
- #delete : Nil
- #exec(query : String, params = [] of String)
- #insert(fields, params)
- #lastval : Int64
- #one?(id, fields : Array(String), as types : Tuple)
- #query_all(*args, **options)
- #query_all(*args, **options, &)
- #query_one?(*args, **options)
- #query_one?(*args, **options, &)
- #quote(*args, **options)
- #quote(*args, **options, &)
- #reset! : Nil
- #scalar(*args, **options)
- #scalar(*args, **options, &)
- #table_name : String
- #tables : Array(String)
- #transaction(&) : Nil
- #truncate : Nil
Instance methods inherited from class Pon::Adapter
query_log(sql, group)
query_log
Class methods inherited from class Pon::Adapter
build_database(setting) : DB::Database
build_database,
database(setting : Setting) : DB::Database
database,
databases
databases,
reset!(setting : Setting) : Nilreset! : Nil reset!, settings settings