Documentation ¶
Index ¶
- func Register(ctx context.Context, conn RegisterConn) error
- type DBQuerier
- func (q *DBQuerier) FindAuthorByID(ctx context.Context, authorID pgtype.Int4) (FindAuthorByIDRow, error)
- func (q *DBQuerier) InsertAuthor(ctx context.Context, firstName pgtype.Text, lastName pgtype.Text) (pgtype.Int4, error)
- func (q *DBQuerier) SelectInt4(ctx context.Context) (pgtype.Int4, error)
- func (q *DBQuerier) SelectInt8(ctx context.Context) (pgtype.Int8, error)
- type FindAuthorByIDRow
- type Querier
- type RegisterConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DBQuerier ¶
type DBQuerier struct {
// contains filtered or unexported fields
}
func NewQuerier ¶
NewQuerier creates a DBQuerier that implements Querier.
func (*DBQuerier) FindAuthorByID ¶
func (q *DBQuerier) FindAuthorByID(ctx context.Context, authorID pgtype.Int4) (FindAuthorByIDRow, error)
FindAuthorByID implements Querier.FindAuthorByID.
func (*DBQuerier) InsertAuthor ¶
func (q *DBQuerier) InsertAuthor(ctx context.Context, firstName pgtype.Text, lastName pgtype.Text) (pgtype.Int4, error)
InsertAuthor implements Querier.InsertAuthor.
func (*DBQuerier) SelectInt4 ¶
SelectInt4 implements Querier.SelectInt4.
type FindAuthorByIDRow ¶
type Querier ¶
type Querier interface { // FindAuthorById finds one (or zero) authors by ID. FindAuthorByID(ctx context.Context, authorID pgtype.Int4) (FindAuthorByIDRow, error) // InsertAuthor inserts an author by name and returns the ID. InsertAuthor(ctx context.Context, firstName pgtype.Text, lastName pgtype.Text) (pgtype.Int4, error) SelectInt8(ctx context.Context) (pgtype.Int8, error) SelectInt4(ctx context.Context) (pgtype.Int4, error) }
Querier is a typesafe Go interface backed by SQL queries.
Click to show internal directories.
Click to hide internal directories.