Documentation ¶
Index ¶
- type DBQuerier
- func (q *DBQuerier) CountAuthors(ctx context.Context) (*int, error)
- func (q *DBQuerier) DeleteAuthorsByFullName(ctx context.Context, params DeleteAuthorsByFullNameParams) (pgconn.CommandTag, error)
- func (q *DBQuerier) FindAuthorByID(ctx context.Context, params FindAuthorByIDParams) (FindAuthorByIDRow, error)
- func (q *DBQuerier) InsertAuthor(ctx context.Context, params InsertAuthorParams) (int32, error)
- type DeleteAuthorsByFullNameParams
- type FindAuthorByIDParams
- type FindAuthorByIDRow
- type InsertAuthorParams
- type Querier
- type QueryName
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBQuerier ¶
type DBQuerier struct {
// contains filtered or unexported fields
}
func NewQuerier ¶
func NewQuerier(conn genericConn) *DBQuerier
NewQuerier creates a DBQuerier that implements Querier.
func (*DBQuerier) CountAuthors ¶
CountAuthors implements Querier.CountAuthors.
func (*DBQuerier) DeleteAuthorsByFullName ¶
func (q *DBQuerier) DeleteAuthorsByFullName(ctx context.Context, params DeleteAuthorsByFullNameParams) (pgconn.CommandTag, error)
DeleteAuthorsByFullName implements Querier.DeleteAuthorsByFullName.
func (*DBQuerier) FindAuthorByID ¶
func (q *DBQuerier) FindAuthorByID(ctx context.Context, params FindAuthorByIDParams) (FindAuthorByIDRow, error)
FindAuthorByID implements Querier.FindAuthorByID.
func (*DBQuerier) InsertAuthor ¶
InsertAuthor implements Querier.InsertAuthor.
type FindAuthorByIDParams ¶
type FindAuthorByIDParams struct {
AuthorID int32 `json:"AuthorID"`
}
type FindAuthorByIDRow ¶
type InsertAuthorParams ¶
type Querier ¶
type Querier interface { // CountAuthors returns the number of authors (zero params). CountAuthors(ctx context.Context) (*int, error) // FindAuthorById finds one (or zero) authors by ID (one param). FindAuthorByID(ctx context.Context, params FindAuthorByIDParams) (FindAuthorByIDRow, error) // InsertAuthor inserts an author by name and returns the ID (two params). InsertAuthor(ctx context.Context, params InsertAuthorParams) (int32, error) // DeleteAuthorsByFullName deletes authors by the full name (three params). DeleteAuthorsByFullName(ctx context.Context, params DeleteAuthorsByFullNameParams) (pgconn.CommandTag, error) }
Querier is a typesafe Go interface backed by SQL queries.
Click to show internal directories.
Click to hide internal directories.