sqlc_gen

package
v0.0.0-...-db501e4 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 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 Cassette

type Cassette struct {
	ID        pgtype.UUID
	UserID    pgtype.UUID
	Name      string
	CreatedAt pgtype.Timestamptz
	UpdatedAt pgtype.Timestamptz
}

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 PostCassetteParams

type PostCassetteParams struct {
	UserID pgtype.UUID
	Name   string
}

type PostSongParams

type PostSongParams struct {
	CassetteID pgtype.UUID
	UserID     pgtype.UUID
	SongNumber int32
	SongTime   pgtype.Int4
	Name       string
	Url        string
}

type PostUserParams

type PostUserParams struct {
	ID      pgtype.UUID
	Name    string
	IconUrl pgtype.Text
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) GetCassette

func (q *Queries) GetCassette(ctx context.Context, id pgtype.UUID) (Cassette, error)

func (*Queries) GetCassettesByUser

func (q *Queries) GetCassettesByUser(ctx context.Context, userID pgtype.UUID) ([]Cassette, error)

func (*Queries) GetUser

func (q *Queries) GetUser(ctx context.Context, id pgtype.UUID) (User, error)

func (*Queries) PostCassette

func (q *Queries) PostCassette(ctx context.Context, arg PostCassetteParams) (Cassette, error)

func (*Queries) PostSong

func (q *Queries) PostSong(ctx context.Context, arg PostSongParams) (Song, error)

func (*Queries) PostUser

func (q *Queries) PostUser(ctx context.Context, arg PostUserParams) (User, error)

func (*Queries) WithTx

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

type Song

type Song struct {
	ID         pgtype.UUID
	CassetteID pgtype.UUID
	UserID     pgtype.UUID
	SongNumber int32
	SongTime   pgtype.Int4
	Name       string
	Url        string
	UploadUser pgtype.UUID
	CreatedAt  pgtype.Timestamptz
	UpdatedAt  pgtype.Timestamptz
}

type User

type User struct {
	ID        pgtype.UUID
	Name      string
	IconUrl   pgtype.Text
	CreatedAt pgtype.Timestamptz
	UpdatedAt pgtype.Timestamptz
	DeletedAt pgtype.Timestamptz
}

Jump to

Keyboard shortcuts

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