Documentation ¶
Index ¶
- type Database
- func (db *Database) Create(r primitives.Record) error
- func (db *Database) Delete(r primitives.Record) error
- func (db *Database) FindBy(field string, value interface{}, r primitives.Record) error
- func (db *Database) Register(rs ...primitives.Record) error
- func (db *Database) Update(r primitives.Record) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
Database is a SQLite3 implementation of the primitives.Database interface.
func (*Database) Create ¶
func (db *Database) Create(r primitives.Record) error
Create inserts a new record in the database.
func (*Database) Delete ¶
func (db *Database) Delete(r primitives.Record) error
Delete removes an existing database record.
func (*Database) FindBy ¶
func (db *Database) FindBy(field string, value interface{}, r primitives.Record) error
FindBy tries to find a record with the column match the value passed. Example: FindBy("id", 1, &primtives.Bear{})
Click to show internal directories.
Click to hide internal directories.