Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoringLogger ¶
type BoringLogger struct {
// contains filtered or unexported fields
}
BoringLogger is a wrapper for the standard logger.
func NewBoringLogger ¶
func NewBoringLogger(out io.Writer) *BoringLogger
NewBoringLogger returns a new instance of the boring logger.
type SqliteHandler ¶
SqliteHandler wraps a connection to a SQLite database.
func NewSqliteHandler ¶
func NewSqliteHandler(fileName string) (*SqliteHandler, error)
NewSqliteHandler istannciate a new connection to the sqlite db. A filepath to the database file name must be supplied.
func (*SqliteHandler) Execute ¶
func (sh *SqliteHandler) Execute(statement string) error
Execute performs the given statement on the database the handler is connected to.
func (*SqliteHandler) Query ¶
func (sh *SqliteHandler) Query(statement string) (repositories.Row, error)
Query performs the given statement on the database the handler is connected to and returns the result.
type SqliteRow ¶
SqliteRow wraps sql results and implements our interfaces/repositories.Row to allow the interfaces to comunicate with the database without handling low level details.
func (SqliteRow) Close ¶
Close closes the Rows, preventing further enumeration. If Next is called and returns false and there are no further result sets, the Rows are closed automatically and it will suffice to check the result of Err. Close is idempotent and does not affect the result of Err.
func (SqliteRow) Next ¶
Next prepares the next result row for reading with the Scan method. It returns true on success, or false if there is no next result row or an error happened while preparing it. Err should be consulted to distinguish between the two cases.