class Sandstone::Adapter::Sqlite
- Sandstone::Adapter::Sqlite
- Sandstone::Adapter::Base
- Reference
- Object
Overview
Sqlite implementation of the Adapter
Defined in:
adapter/sqlite.crInstance Method Summary
-
#clear(table_name)
remove all rows from a table and reset the counter on the id.
-
#delete(table_name, primary_name, value)
This will delete a row from the database.
-
#insert(table_name, fields, params) : Int64
This will insert a row in the database and return the id generated.
-
#select(table_name, fields, clause = "", params = [] of DB::Any, &block : DB::ResultSet -> )
select performs a query against a table.
-
#select_one(table_name, fields, field, id, &)
select_one is used by the find method.
-
#update(table_name, primary_name, fields, params)
This will update a row in the database.
Instance methods inherited from class Sandstone::Adapter::Base
clear(table_name)
clear,
database : DB::Database
database,
database=(database : DB::Database)
database=,
delete(table_name, primary_name, value)
delete,
insert(table_name, fields, params) : Int64
insert,
log(query : String, params = [] of String) : Nil
log,
open(&)
open,
select(table_name, fields, clause = "", params = [] of DB::Any, &block : DB::ResultSet -> )
select,
settings(adapter : String)
settings,
update(table_name, primary_name, fields, params)
update
Constructor methods inherited from class Sandstone::Adapter::Base
new(adapter : String)
new
Class methods inherited from class Sandstone::Adapter::Base
env(url)
env
Instance Method Detail
def insert(table_name, fields, params) : Int64
#
Description copied from class Sandstone::Adapter::Base
This will insert a row in the database and return the id generated.
select performs a query against a table. The table_name and fields are configured using the sql_mapping directive in your model. The clause and params is the query and params that is passed in via .all() method