abstract class Pon::Adapter::RDB

Overview

base class for crystal-db

Direct Known Subclasses

Defined in:

pon/adapter/rdb.cr

Constant 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

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) : Nil
reset! : Nil
reset!
, settings settings

Instance Method Detail

abstract def all(fields : Array(String), types, query_string = nil, **opts) #

[View source]
abstract def count : Int32 #

[View source]
abstract def databases : Array(String) #

odbc


[View source]
abstract def delete(key) : Nil #

[View source]
abstract def delete : Nil #

[View source]
abstract def exec(query : String, params = [] of String) #

[View source]
abstract def insert(fields, params) #

[View source]
abstract def lastval : Int64 #

[View source]
abstract def one?(id, fields : Array(String), as types : Tuple) #

[View source]
def query_all(*args, **options) #

[View source]
def query_all(*args, **options, &) #

[View source]
def query_one?(*args, **options) #

[View source]
def query_one?(*args, **options, &) #

[View source]
def quote(*args, **options) #

[View source]
def quote(*args, **options, &) #

[View source]
abstract def reset! : Nil #

[View source]
def scalar(*args, **options) #

[View source]
def scalar(*args, **options, &) #

[View source]
abstract def table_name : String #

[View source]
abstract def tables : Array(String) #

[View source]
abstract def transaction(&) : Nil #

[View source]
abstract def truncate : Nil #

[View source]