Documentation ¶ Index ¶ Variables type DB func NewDB(ctx context.Context, dbPath string) (*DB, error) func (db *DB) Exec(ctx context.Context, query string, args ...interface{}) (sql.Result, error) func (db *DB) Query(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) func (db *DB) QueryRow(ctx context.Context, query string, args ...interface{}) *sql.Row type Ext Constants ¶ This section is empty. Variables ¶ View Source var ErrNotFound = errors.New("not found") View Source var ErrParsingFaled = errors.New("parsing failed") Functions ¶ This section is empty. Types ¶ type DB ¶ type DB struct { *sql.DB } func NewDB ¶ func NewDB(ctx context.Context, dbPath string) (*DB, error) func (*DB) Exec ¶ func (db *DB) Exec(ctx context.Context, query string, args ...interface{}) (sql.Result, error) func (*DB) Query ¶ func (db *DB) Query(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) func (*DB) QueryRow ¶ func (db *DB) QueryRow(ctx context.Context, query string, args ...interface{}) *sql.Row type Ext ¶ type Ext interface { Exec(ctx context.Context, query string, args ...interface{}) (sql.Result, error) Query(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) QueryRow(ctx context.Context, query string, args ...interface{}) *sql.Row } Source Files ¶ View all Source files db.go error.go Click to show internal directories. Click to hide internal directories.