Documentation ¶
Overview ¶
Package database provides the persistence layer and the assorted operations we need to perform.
Index ¶
- type Database
- func (db *Database) Begin() error
- func (db *Database) Close()
- func (db *Database) Commit() error
- func (db *Database) EventAdd(ev *event.Event) error
- func (db *Database) EventGetRecent(n int) ([]event.Event, error)
- func (db *Database) EventGetRecentByType(n int, evType event.ID) ([]event.Event, error)
- func (db *Database) EventGetRecentErr(n int) ([]event.Event, error)
- func (db *Database) Rollback() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database wraps the database connection and its associated state and exposes the operations we can perform on it.
func (*Database) EventGetRecent ¶
EventGetRecent fetches the (up to) <n> most recent events from the database. If n == -1, all Events are fetched.
func (*Database) EventGetRecentByType ¶
EventGetRecentByType fetches the <n> most recent Events of the given type.
func (*Database) EventGetRecentErr ¶
Directories ¶
Path | Synopsis |
---|---|
Package event provides symbolic constants that represent the destructive operations we can perform using the package manager.
|
Package event provides symbolic constants that represent the destructive operations we can perform using the package manager. |
Package query provides symbolic constants that identify the operations we perform on the database.
|
Package query provides symbolic constants that identify the operations we perform on the database. |
Click to show internal directories.
Click to hide internal directories.