sqlc

package
v0.0.0-...-6d126c1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 LyricsTypeEnum

type LyricsTypeEnum string
const (
	LyricsTypeEnumPlain        LyricsTypeEnum = "plain"
	LyricsTypeEnumSynced       LyricsTypeEnum = "synced"
	LyricsTypeEnumInstrumental LyricsTypeEnum = "instrumental"
	LyricsTypeEnumMissing      LyricsTypeEnum = "missing"
)

func (*LyricsTypeEnum) Scan

func (e *LyricsTypeEnum) Scan(src interface{}) error

type Message

type Message struct {
	ID        int32
	Name      string
	Ip        string
	Message   string
	CreatedAt pgtype.Timestamptz
}

type MessageCreateParams

type MessageCreateParams struct {
	Name    string
	Ip      string
	Message string
}

type NullLyricsTypeEnum

type NullLyricsTypeEnum struct {
	LyricsTypeEnum LyricsTypeEnum
	Valid          bool // Valid is true if LyricsTypeEnum is not NULL
}

func (*NullLyricsTypeEnum) Scan

func (ns *NullLyricsTypeEnum) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullLyricsTypeEnum) Value

func (ns NullLyricsTypeEnum) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullTapCategory

type NullTapCategory struct {
	TapCategory TapCategory
	Valid       bool // Valid is true if TapCategory is not NULL
}

func (*NullTapCategory) Scan

func (ns *NullTapCategory) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullTapCategory) Value

func (ns NullTapCategory) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) MessageCreate

func (q *Queries) MessageCreate(ctx context.Context, arg MessageCreateParams) (int32, error)

func (*Queries) MessageGetByID

func (q *Queries) MessageGetByID(ctx context.Context, id int32) (Message, error)

func (*Queries) MessageGetLast

func (q *Queries) MessageGetLast(ctx context.Context) (Message, error)

func (*Queries) MessageGetSinceID

func (q *Queries) MessageGetSinceID(ctx context.Context, id int32) ([]Message, error)

func (*Queries) ReplyCreate

func (q *Queries) ReplyCreate(ctx context.Context, arg ReplyCreateParams) (int32, error)

func (*Queries) ReplyGetSinceMessageID

func (q *Queries) ReplyGetSinceMessageID(ctx context.Context, messageID int32) ([]Reply, error)

func (*Queries) ScanCreate

func (q *Queries) ScanCreate(ctx context.Context, arg ScanCreateParams) (int32, error)

func (*Queries) ScanGetAllSinceID

func (q *Queries) ScanGetAllSinceID(ctx context.Context, id int32) ([]Scan, error)

func (*Queries) ScanGetInSeason

func (q *Queries) ScanGetInSeason(ctx context.Context, id int32) ([]Scan, error)

func (*Queries) ScanGetLast

func (q *Queries) ScanGetLast(ctx context.Context) (Scan, error)

func (*Queries) SeasonCreate

func (q *Queries) SeasonCreate(ctx context.Context, arg SeasonCreateParams) (int32, error)

func (*Queries) SeasonDeleteAll

func (q *Queries) SeasonDeleteAll(ctx context.Context) error

func (*Queries) SeasonGetAll

func (q *Queries) SeasonGetAll(ctx context.Context) ([]Season, error)

func (*Queries) SeasonGetCurrent

func (q *Queries) SeasonGetCurrent(ctx context.Context) (Season, error)

func (*Queries) SeasonUpdate

func (q *Queries) SeasonUpdate(ctx context.Context, arg SeasonUpdateParams) error

func (*Queries) SongArtistCreate

func (q *Queries) SongArtistCreate(ctx context.Context, arg SongArtistCreateParams) (int32, error)

func (*Queries) SongArtistGenreCreate

func (q *Queries) SongArtistGenreCreate(ctx context.Context, arg SongArtistGenreCreateParams) (int32, error)

func (*Queries) SongArtistGetBySpotify

func (q *Queries) SongArtistGetBySpotify(ctx context.Context, spotifyID string) (SongArtist, error)

func (*Queries) SongArtistGetTop50

func (q *Queries) SongArtistGetTop50(ctx context.Context) ([]SongArtistGetTop50Row, error)

func (*Queries) SongArtistGetTop50Monthly

func (q *Queries) SongArtistGetTop50Monthly(ctx context.Context) ([]SongArtistGetTop50MonthlyRow, error)

func (*Queries) SongArtistSongCreate

func (q *Queries) SongArtistSongCreate(ctx context.Context, arg SongArtistSongCreateParams) (int32, error)

func (*Queries) SongCreate

func (q *Queries) SongCreate(ctx context.Context, arg SongCreateParams) (int32, error)

func (*Queries) SongGenreCreate

func (q *Queries) SongGenreCreate(ctx context.Context, genre string) (int32, error)

func (*Queries) SongGenreGetByGenre

func (q *Queries) SongGenreGetByGenre(ctx context.Context, genre string) (SongGenre, error)

func (*Queries) SongGenreGetTop50

func (q *Queries) SongGenreGetTop50(ctx context.Context) ([]SongGenreGetTop50Row, error)

func (*Queries) SongGenreGetTop50Monthly

func (q *Queries) SongGenreGetTop50Monthly(ctx context.Context) ([]SongGenreGetTop50MonthlyRow, error)

func (*Queries) SongGetBySpotify

func (q *Queries) SongGetBySpotify(ctx context.Context, spotifyID string) (Song, error)

func (*Queries) SongGetLast50

func (q *Queries) SongGetLast50(ctx context.Context) ([]SongGetLast50Row, error)

func (*Queries) SongGetLastPopulated

func (q *Queries) SongGetLastPopulated(ctx context.Context) ([]SongGetLastPopulatedRow, error)

func (*Queries) SongGetTop50

func (q *Queries) SongGetTop50(ctx context.Context) ([]SongGetTop50Row, error)

func (*Queries) SongGetTop50Monthly

func (q *Queries) SongGetTop50Monthly(ctx context.Context) ([]SongGetTop50MonthlyRow, error)

func (*Queries) SongHistoryCreate

func (q *Queries) SongHistoryCreate(ctx context.Context, songID int32) (int32, error)

func (*Queries) TapCreate

func (q *Queries) TapCreate(ctx context.Context, arg TapCreateParams) (int32, error)

func (*Queries) TapGetCountByCategory

func (q *Queries) TapGetCountByCategory(ctx context.Context) ([]TapGetCountByCategoryRow, error)

func (*Queries) TapGetLast

func (q *Queries) TapGetLast(ctx context.Context) (Tap, error)

func (*Queries) WithTx

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

type Reply

type Reply struct {
	ID        int32
	MessageID int32
	Name      pgtype.Text
	Message   string
	CreatedAt pgtype.Timestamptz
}

type ReplyCreateParams

type ReplyCreateParams struct {
	MessageID int32
	Name      pgtype.Text
	Message   string
}

type Scan

type Scan struct {
	ID       int32
	ScanTime pgtype.Timestamptz
	ScanID   int32
}

type ScanCreateParams

type ScanCreateParams struct {
	ScanID   int32
	ScanTime pgtype.Timestamptz
}

type Season

type Season struct {
	ID      int32
	Name    string
	Start   pgtype.Timestamp
	End     pgtype.Timestamp
	Current bool
}

type SeasonCreateParams

type SeasonCreateParams struct {
	Name    string
	Start   pgtype.Timestamp
	End     pgtype.Timestamp
	Current bool
}

type SeasonUpdateParams

type SeasonUpdateParams struct {
	Name    string
	Start   pgtype.Timestamp
	End     pgtype.Timestamp
	Current bool
	ID      int32
}

type Song

type Song struct {
	ID         int32
	Title      string
	SpotifyID  string
	DurationMs int32
	Album      string
	Lyrics     pgtype.Text
	LyricsType LyricsTypeEnum
}

type SongArtist

type SongArtist struct {
	ID        int32
	Name      string
	SpotifyID string
}

type SongArtistCreateParams

type SongArtistCreateParams struct {
	Name      string
	SpotifyID string
}

type SongArtistGenre

type SongArtistGenre struct {
	ID       int32
	ArtistID int32
	GenreID  int32
}

type SongArtistGenreCreateParams

type SongArtistGenreCreateParams struct {
	ArtistID int32
	GenreID  int32
}

type SongArtistGetTop50MonthlyRow

type SongArtistGetTop50MonthlyRow struct {
	SongArtist SongArtist
	PlayCount  int64
}

type SongArtistGetTop50Row

type SongArtistGetTop50Row struct {
	SongArtist SongArtist
	PlayCount  int64
}

type SongArtistSong

type SongArtistSong struct {
	ID       int32
	ArtistID int32
	SongID   int32
}

type SongArtistSongCreateParams

type SongArtistSongCreateParams struct {
	ArtistID int32
	SongID   int32
}

type SongCreateParams

type SongCreateParams struct {
	Title      string
	Album      string
	SpotifyID  string
	DurationMs int32
	LyricsType LyricsTypeEnum
	Lyrics     pgtype.Text
}

type SongGenre

type SongGenre struct {
	ID    int32
	Genre string
}

type SongGenreGetTop50MonthlyRow

type SongGenreGetTop50MonthlyRow struct {
	SongGenre SongGenre
	PlayCount int64
}

type SongGenreGetTop50Row

type SongGenreGetTop50Row struct {
	SongGenre SongGenre
	PlayCount int64
}

type SongGetLast50Row

type SongGetLast50Row struct {
	Song      Song
	PlayCount int64
}

type SongGetLastPopulatedRow

type SongGetLastPopulatedRow struct {
	SongHistory SongHistory
	Song        Song
	SongArtist  SongArtist
}

type SongGetTop50MonthlyRow

type SongGetTop50MonthlyRow struct {
	Song      Song
	PlayCount int64
}

type SongGetTop50Row

type SongGetTop50Row struct {
	Song      Song
	PlayCount int64
}

type SongHistory

type SongHistory struct {
	ID        int32
	SongID    int32
	CreatedAt pgtype.Timestamptz
}

type Tap

type Tap struct {
	ID             int32
	OrderID        int32
	OrderCreatedAt pgtype.Timestamptz
	Name           string
	CreatedAt      pgtype.Timestamptz
	Category       TapCategory
}

type TapCategory

type TapCategory string
const (
	TapCategorySoft    TapCategory = "soft"
	TapCategoryMate    TapCategory = "mate"
	TapCategoryBeer    TapCategory = "beer"
	TapCategoryFood    TapCategory = "food"
	TapCategoryUnknown TapCategory = "unknown"
)

func (*TapCategory) Scan

func (e *TapCategory) Scan(src interface{}) error

type TapCreateParams

type TapCreateParams struct {
	OrderID        int32
	OrderCreatedAt pgtype.Timestamptz
	Name           string
	Category       TapCategory
}

type TapGetCountByCategoryRow

type TapGetCountByCategoryRow struct {
	Category             TapCategory
	Count                int64
	LatestOrderCreatedAt pgtype.Timestamp
}

Jump to

Keyboard shortcuts

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