repo

package
v0.0.0-...-86bf676 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreatePersonParams

type CreatePersonParams struct {
	ID       string
	Nickname string
	Name     string
	Birthday string
	Stack    []string
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type GetPersonRow

type GetPersonRow struct {
	ID       string
	Nickname string
	Name     string
	Birthday string
	Stack    []string
}

type Person

type Person struct {
	ID        string
	Nickname  string
	Name      string
	Birthday  string
	Stack     []string
	Docsearch interface{}
	Trigram   pgtype.Text
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) CountPerson

func (q *Queries) CountPerson(ctx context.Context) (int64, error)

func (*Queries) CreatePerson

func (q *Queries) CreatePerson(ctx context.Context, arg CreatePersonParams) error

func (*Queries) GetPerson

func (q *Queries) GetPerson(ctx context.Context, id string) (GetPersonRow, error)

func (*Queries) SearchPerson

func (q *Queries) SearchPerson(ctx context.Context, query string) ([]SearchPersonRow, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type SearchPersonRow

type SearchPersonRow struct {
	ID       string
	Nickname string
	Name     string
	Birthday string
	Stack    []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL