sqlc

package
v0.0.0-...-3f23c4f Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBatchAlreadyClosed = errors.New("batch already closed")
)

Functions

This section is empty.

Types

type Anime

type Anime struct {
	ID              uuid.UUID
	ProviderID      string
	Provider        enum.AnimeProvider
	Poster          *string
	Banner          *string
	Score           *int
	CountryOfOrigin *string
	AgeRating       *string
	CreatedAt       time.Time
	UpdatedAt       time.Time
	Description     *string
	Status          *enum.Status
	Format          *enum.Format
	Season          *enum.Season
	SeasonYear      *int
	StartDate       *time.Time
	EndDate         *time.Time
}

type AnimeFormat

type AnimeFormat string
const (
	AnimeFormatUNKNOWN AnimeFormat = "UNKNOWN"
	AnimeFormatOVA     AnimeFormat = "OVA"
	AnimeFormatONA     AnimeFormat = "ONA"
	AnimeFormatTV      AnimeFormat = "TV"
	AnimeFormatMOVIE   AnimeFormat = "MOVIE"
	AnimeFormatMUSIC   AnimeFormat = "MUSIC"
	AnimeFormatSPECIAL AnimeFormat = "SPECIAL"
)

func AllAnimeFormatValues

func AllAnimeFormatValues() []AnimeFormat

func (*AnimeFormat) Scan

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

func (AnimeFormat) Valid

func (e AnimeFormat) Valid() bool

type AnimeGenre

type AnimeGenre struct {
	ID        uuid.UUID
	AnimeID   uuid.UUID
	GenreID   uuid.UUID
	CreatedAt time.Time
	UpdatedAt time.Time
}

type AnimeMapping

type AnimeMapping struct {
	// mapping group id
	ID uuid.UUID
	// provider such as "ANILISTl", "ANIDB"
	Provider enum.AnimeProvider
	// provider value for the mapping, such as ("ANILIST", 21) is "One Piece"
	ProviderID string
	CreatedAt  time.Time
}

type AnimeProvider

type AnimeProvider string
const (
	AnimeProviderUNKNOWN     AnimeProvider = "UNKNOWN"
	AnimeProviderMYANIMELIST AnimeProvider = "MYANIMELIST"
	AnimeProviderANIMEPLANET AnimeProvider = "ANIME_PLANET"
	AnimeProviderKITSUIO     AnimeProvider = "KITSU_IO"
	AnimeProviderANISEARCH   AnimeProvider = "ANISEARCH"
	AnimeProviderANILIST     AnimeProvider = "ANILIST"
	AnimeProviderNOTIFYMOE   AnimeProvider = "NOTIFY_MOE"
	AnimeProviderANIDBNET    AnimeProvider = "ANIDB_NET"
	AnimeProviderLIVECHARTME AnimeProvider = "LIVECHART_ME"
	AnimeProviderIMDB        AnimeProvider = "IMDB"
	AnimeProviderTHETVDB     AnimeProvider = "THE_TV_DB"
	AnimeProviderFANARTTV    AnimeProvider = "FANART_TV"
)

func AllAnimeProviderValues

func AllAnimeProviderValues() []AnimeProvider

func (*AnimeProvider) Scan

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

func (AnimeProvider) Valid

func (e AnimeProvider) Valid() bool

type AnimeRecommendation

type AnimeRecommendation struct {
	ID                    uuid.UUID
	AnimeID               uuid.UUID
	RecommendedProviderID string
	RecommendedProvider   enum.AnimeProvider
	Rating                float64
	CreatedAt             time.Time
	UpdatedAt             time.Time
}

type AnimeRelation

type AnimeRelation struct {
	ID                   uuid.UUID
	AnimeID              uuid.UUID
	RelatedAnimeID       string
	RelatedAnimeProvider enum.AnimeProvider
	RelationType         enum.AnimeRelationType
	CreatedAt            time.Time
	UpdatedAt            time.Time
}

type AnimeRelationType

type AnimeRelationType string
const (
	AnimeRelationTypeUNKNOWN    AnimeRelationType = "UNKNOWN"
	AnimeRelationTypeADAPTATION AnimeRelationType = "ADAPTATION"
	AnimeRelationTypePREQUEL    AnimeRelationType = "PREQUEL"
	AnimeRelationTypeSEQUEL     AnimeRelationType = "SEQUEL"
	AnimeRelationTypePARENT     AnimeRelationType = "PARENT"
	AnimeRelationTypeSIDESTORY  AnimeRelationType = "SIDE_STORY"
	AnimeRelationTypeSPINOFF    AnimeRelationType = "SPIN_OFF"
)

func AllAnimeRelationTypeValues

func AllAnimeRelationTypeValues() []AnimeRelationType

func (*AnimeRelationType) Scan

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

func (AnimeRelationType) Valid

func (e AnimeRelationType) Valid() bool

type AnimeSeason

type AnimeSeason string
const (
	AnimeSeasonUNKNOWN AnimeSeason = "UNKNOWN"
	AnimeSeasonSPRING  AnimeSeason = "SPRING"
	AnimeSeasonSUMMER  AnimeSeason = "SUMMER"
	AnimeSeasonFALL    AnimeSeason = "FALL"
	AnimeSeasonWINTER  AnimeSeason = "WINTER"
)

func AllAnimeSeasonValues

func AllAnimeSeasonValues() []AnimeSeason

func (*AnimeSeason) Scan

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

func (AnimeSeason) Valid

func (e AnimeSeason) Valid() bool

type AnimeStatus

type AnimeStatus string
const (
	AnimeStatusUNKNOWN   AnimeStatus = "UNKNOWN"
	AnimeStatusFINISHED  AnimeStatus = "FINISHED"
	AnimeStatusRELEASING AnimeStatus = "RELEASING"
	AnimeStatusUPCOMING  AnimeStatus = "UPCOMING"
	AnimeStatusCANCELED  AnimeStatus = "CANCELED"
)

func AllAnimeStatusValues

func AllAnimeStatusValues() []AnimeStatus

func (*AnimeStatus) Scan

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

func (AnimeStatus) Valid

func (e AnimeStatus) Valid() bool

type AnimeStudio

type AnimeStudio struct {
	ID        uuid.UUID
	AnimeID   uuid.UUID
	StudioID  uuid.UUID
	CreatedAt time.Time
	UpdatedAt time.Time
}

type AnimeTag

type AnimeTag struct {
	ID        uuid.UUID
	AnimeID   uuid.UUID
	TagID     uuid.UUID
	CreatedAt time.Time
	UpdatedAt time.Time
}

type AnimeTitle

type AnimeTitle struct {
	ID        uuid.UUID
	AnimeID   uuid.UUID
	Name      string
	TitleType enum.AnimeTitleType
	CreatedAt time.Time
	UpdatedAt time.Time
	Language  *string
}

type AnimeTitleType

type AnimeTitleType string
const (
	AnimeTitleTypeUNKNOWN  AnimeTitleType = "UNKNOWN"
	AnimeTitleTypeOFFICIAL AnimeTitleType = "OFFICIAL"
	AnimeTitleTypeSHORT    AnimeTitleType = "SHORT"
	AnimeTitleTypeSYNONYM  AnimeTitleType = "SYNONYM"
	AnimeTitleTypeMAIN     AnimeTitleType = "MAIN"
)

func AllAnimeTitleTypeValues

func AllAnimeTitleTypeValues() []AnimeTitleType

func (*AnimeTitleType) Scan

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

func (AnimeTitleType) Valid

func (e AnimeTitleType) Valid() bool

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
	SendBatch(context.Context, *pgx.Batch) pgx.BatchResults
}

type DeleteAnimeGenreParams

type DeleteAnimeGenreParams struct {
	AnimeID uuid.UUID
	GenreID uuid.UUID
}

type DeleteAnimeParams

type DeleteAnimeParams struct {
	ID         uuid.NullUUID
	Provider   *enum.AnimeProvider
	ProviderID *string
}

type DeleteAnimeStudioParams

type DeleteAnimeStudioParams struct {
	AnimeID  uuid.UUID
	StudioID uuid.UUID
}

type DeleteAnimeTagParams

type DeleteAnimeTagParams struct {
	AnimeID uuid.UUID
	TagID   uuid.UUID
}

type FilterAnimeMappingParams

type FilterAnimeMappingParams struct {
	ID       []uuid.UUID
	Provider *enum.AnimeProvider
}

type FilterAnimeParams

type FilterAnimeParams struct {
	ID          uuid.NullUUID
	Provider    *enum.AnimeProvider
	ProviderIDs []string
}

type FindGenreParams

type FindGenreParams struct {
	Provider enum.AnimeProvider
	Slug     []string
}

type FindStudioParams

type FindStudioParams struct {
	Provider enum.AnimeProvider
	Slug     []string
}

type FindTagParams

type FindTagParams struct {
	Provider enum.AnimeProvider
	Slug     []string
}

type FirstGenreParams

type FirstGenreParams struct {
	ID       uuid.UUID
	Name     string
	Slug     string
	Provider enum.AnimeProvider
}

type FirstStudioParams

type FirstStudioParams struct {
	ID       uuid.UUID
	Name     string
	Slug     string
	Provider enum.AnimeProvider
}

type FirstTagParams

type FirstTagParams struct {
	ID       uuid.UUID
	Name     string
	Slug     string
	Provider enum.AnimeProvider
}

type Genre

type Genre struct {
	ID        uuid.UUID
	Provider  enum.AnimeProvider
	CreatedAt time.Time
	UpdatedAt time.Time
	Name      string
	Slug      string
}

type GetAnimeGenreParams

type GetAnimeGenreParams struct {
	AnimeID uuid.UUID
	GenreID uuid.UUID
}

type GetAnimeGenresWithAnimeParams

type GetAnimeGenresWithAnimeParams struct {
	AnimeID uuid.UUID
	GenreID uuid.UUID
}

type GetAnimeGenresWithProviderSlugParams

type GetAnimeGenresWithProviderSlugParams struct {
	Provider enum.AnimeProvider
	Slugs    []string
}

type GetAnimeStudioParams

type GetAnimeStudioParams struct {
	AnimeID  uuid.UUID
	StudioID uuid.UUID
}

type GetAnimeStudiosWithAnimeParams

type GetAnimeStudiosWithAnimeParams struct {
	AnimeID  uuid.UUID
	StudioID uuid.UUID
}

type GetAnimeStudiosWithProviderSlugParams

type GetAnimeStudiosWithProviderSlugParams struct {
	Provider enum.AnimeProvider
	Slugs    []string
}

type GetAnimeTagParams

type GetAnimeTagParams struct {
	AnimeID uuid.UUID
	TagID   uuid.UUID
}

type GetAnimeTagsWithAnimeParams

type GetAnimeTagsWithAnimeParams struct {
	AnimeID uuid.UUID
	TagID   uuid.UUID
}

type GetAnimeTagsWithProviderSlugParams

type GetAnimeTagsWithProviderSlugParams struct {
	Provider enum.AnimeProvider
	Slugs    []string
}

type InsertAnimeBatchResults

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

func (*InsertAnimeBatchResults) Close

func (b *InsertAnimeBatchResults) Close() error

func (*InsertAnimeBatchResults) Query

func (b *InsertAnimeBatchResults) Query(f func(int, []*InsertAnimeRow, error))

type InsertAnimeGenreBatchResults

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

func (*InsertAnimeGenreBatchResults) Close

func (*InsertAnimeGenreBatchResults) Exec

func (b *InsertAnimeGenreBatchResults) Exec(f func(int, error))

type InsertAnimeGenreParams

type InsertAnimeGenreParams struct {
	AnimeID uuid.UUID
	GenreID uuid.UUID
}

type InsertAnimeMappingBatchResults

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

func (*InsertAnimeMappingBatchResults) Close

func (*InsertAnimeMappingBatchResults) Exec

func (b *InsertAnimeMappingBatchResults) Exec(f func(int, error))

type InsertAnimeMappingParams

type InsertAnimeMappingParams struct {
	ID         uuid.UUID
	Provider   enum.AnimeProvider
	ProviderID string
}

type InsertAnimeParams

type InsertAnimeParams struct {
	Provider        enum.AnimeProvider
	ProviderID      string
	Poster          *string
	Banner          *string
	Score           *int
	CountryOfOrigin *string
	AgeRating       *string
	Description     *string
	Status          *enum.Status
	Format          *enum.Format
	Season          *enum.Season
	SeasonYear      *int
	StartDate       *time.Time
	EndDate         *time.Time
}

type InsertAnimeRecommendationBatchResults

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

func (*InsertAnimeRecommendationBatchResults) Close

func (*InsertAnimeRecommendationBatchResults) Exec

type InsertAnimeRecommendationParams

type InsertAnimeRecommendationParams struct {
	AnimeID               uuid.UUID
	RecommendedProviderID string
	RecommendedProvider   enum.AnimeProvider
	Rating                float64
}

type InsertAnimeRelationBatchResults

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

func (*InsertAnimeRelationBatchResults) Close

func (*InsertAnimeRelationBatchResults) Exec

func (b *InsertAnimeRelationBatchResults) Exec(f func(int, error))

type InsertAnimeRelationParams

type InsertAnimeRelationParams struct {
	AnimeID              uuid.UUID
	RelatedAnimeID       string
	RelatedAnimeProvider enum.AnimeProvider
	RelationType         enum.AnimeRelationType
}

type InsertAnimeRow

type InsertAnimeRow struct {
	ID         uuid.UUID
	Provider   enum.AnimeProvider
	ProviderID string
}

type InsertAnimeStudioBatchResults

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

func (*InsertAnimeStudioBatchResults) Close

func (*InsertAnimeStudioBatchResults) Exec

func (b *InsertAnimeStudioBatchResults) Exec(f func(int, error))

type InsertAnimeStudioParams

type InsertAnimeStudioParams struct {
	AnimeID  uuid.UUID
	StudioID uuid.UUID
}

type InsertAnimeTagBatchResults

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

func (*InsertAnimeTagBatchResults) Close

func (b *InsertAnimeTagBatchResults) Close() error

func (*InsertAnimeTagBatchResults) Exec

func (b *InsertAnimeTagBatchResults) Exec(f func(int, error))

type InsertAnimeTagParams

type InsertAnimeTagParams struct {
	AnimeID uuid.UUID
	TagID   uuid.UUID
}

type InsertAnimeTitleBatchResults

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

func (*InsertAnimeTitleBatchResults) Close

func (*InsertAnimeTitleBatchResults) Exec

func (b *InsertAnimeTitleBatchResults) Exec(f func(int, error))

type InsertAnimeTitleParams

type InsertAnimeTitleParams struct {
	AnimeID   uuid.UUID
	Name      string
	TitleType enum.AnimeTitleType
	Language  *string
}

type InsertGenreBatchResults

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

func (*InsertGenreBatchResults) Close

func (b *InsertGenreBatchResults) Close() error

func (*InsertGenreBatchResults) Query

func (b *InsertGenreBatchResults) Query(f func(int, []*InsertGenreRow, error))

type InsertGenreParams

type InsertGenreParams struct {
	Provider enum.AnimeProvider
	Name     string
	Slug     string
}

type InsertGenreRow

type InsertGenreRow struct {
	ID        uuid.UUID
	Provider  enum.AnimeProvider
	CreatedAt time.Time
	UpdatedAt time.Time
	Name      string
	Slug      string
}

type InsertStudioBatchResults

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

func (*InsertStudioBatchResults) Close

func (b *InsertStudioBatchResults) Close() error

func (*InsertStudioBatchResults) Query

func (b *InsertStudioBatchResults) Query(f func(int, []*InsertStudioRow, error))

type InsertStudioParams

type InsertStudioParams struct {
	Provider enum.AnimeProvider
	Name     string
	Slug     string
}

type InsertStudioRow

type InsertStudioRow struct {
	ID        uuid.UUID
	Provider  enum.AnimeProvider
	CreatedAt time.Time
	UpdatedAt time.Time
	Name      string
	Slug      string
}

type InsertTagBatchResults

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

func (*InsertTagBatchResults) Close

func (b *InsertTagBatchResults) Close() error

func (*InsertTagBatchResults) Query

func (b *InsertTagBatchResults) Query(f func(int, []*InsertTagRow, error))

type InsertTagParams

type InsertTagParams struct {
	Provider    enum.AnimeProvider
	Name        string
	Slug        string
	Description *string
}

type InsertTagRow

type InsertTagRow struct {
	ID          uuid.UUID
	Provider    enum.AnimeProvider
	CreatedAt   time.Time
	UpdatedAt   time.Time
	Name        string
	Slug        string
	Description *string
}

type ListAnimeWithMappingsRow

type ListAnimeWithMappingsRow struct {
	ID              uuid.UUID
	ProviderID      string
	Provider        enum.AnimeProvider
	AnimeID         uuid.NullUUID
	Poster          *string
	Banner          *string
	Score           *int
	CountryOfOrigin *string
	AgeRating       *string
	CreatedAt       *time.Time
	UpdatedAt       *time.Time
	Description     *string
	Status          *enum.Status
	Format          *enum.Format
	Season          *enum.Season
	SeasonYear      *int
	StartDate       *time.Time
	EndDate         *time.Time
	TagIds          []uuid.UUID
	GenreIds        []uuid.UUID
	StudioIds       []uuid.UUID
}

type NullAnimeFormat

type NullAnimeFormat struct {
	AnimeFormat AnimeFormat
	Valid       bool // Valid is true if AnimeFormat is not NULL
}

func (*NullAnimeFormat) Scan

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

Scan implements the Scanner interface.

func (NullAnimeFormat) Value

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

Value implements the driver Valuer interface.

type NullAnimeProvider

type NullAnimeProvider struct {
	AnimeProvider AnimeProvider
	Valid         bool // Valid is true if AnimeProvider is not NULL
}

func (*NullAnimeProvider) Scan

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

Scan implements the Scanner interface.

func (NullAnimeProvider) Value

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

Value implements the driver Valuer interface.

type NullAnimeRelationType

type NullAnimeRelationType struct {
	AnimeRelationType AnimeRelationType
	Valid             bool // Valid is true if AnimeRelationType is not NULL
}

func (*NullAnimeRelationType) Scan

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

Scan implements the Scanner interface.

func (NullAnimeRelationType) Value

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

Value implements the driver Valuer interface.

type NullAnimeSeason

type NullAnimeSeason struct {
	AnimeSeason AnimeSeason
	Valid       bool // Valid is true if AnimeSeason is not NULL
}

func (*NullAnimeSeason) Scan

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

Scan implements the Scanner interface.

func (NullAnimeSeason) Value

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

Value implements the driver Valuer interface.

type NullAnimeStatus

type NullAnimeStatus struct {
	AnimeStatus AnimeStatus
	Valid       bool // Valid is true if AnimeStatus is not NULL
}

func (*NullAnimeStatus) Scan

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

Scan implements the Scanner interface.

func (NullAnimeStatus) Value

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

Value implements the driver Valuer interface.

type NullAnimeTitleType

type NullAnimeTitleType struct {
	AnimeTitleType AnimeTitleType
	Valid          bool // Valid is true if AnimeTitleType is not NULL
}

func (*NullAnimeTitleType) Scan

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

Scan implements the Scanner interface.

func (NullAnimeTitleType) Value

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

Value implements the driver Valuer interface.

type Querier

type Querier interface {
	DeleteAnime(ctx context.Context, arg DeleteAnimeParams) (int64, error)
	DeleteAnimeGenre(ctx context.Context, arg DeleteAnimeGenreParams) (int64, error)
	DeleteAnimeRecommendation(ctx context.Context, ids []uuid.UUID) (int64, error)
	DeleteAnimeRelation(ctx context.Context, ids []uuid.UUID) (int64, error)
	DeleteAnimeStudio(ctx context.Context, arg DeleteAnimeStudioParams) (int64, error)
	DeleteAnimeTag(ctx context.Context, arg DeleteAnimeTagParams) (int64, error)
	DeleteGenre(ctx context.Context, id uuid.UUID) (int64, error)
	DeleteStudio(ctx context.Context, id uuid.UUID) (int64, error)
	DeleteTag(ctx context.Context, id uuid.UUID) (int64, error)
	FilterAnime(ctx context.Context, arg FilterAnimeParams) ([]*Anime, error)
	FilterAnimeMapping(ctx context.Context, arg FilterAnimeMappingParams) ([]*AnimeMapping, error)
	FindGenre(ctx context.Context, arg FindGenreParams) ([]*Genre, error)
	FindStudio(ctx context.Context, arg FindStudioParams) ([]*Studio, error)
	FindTag(ctx context.Context, arg FindTagParams) ([]*Tag, error)
	FirstGenre(ctx context.Context, arg FirstGenreParams) (*Genre, error)
	FirstStudio(ctx context.Context, arg FirstStudioParams) (*Studio, error)
	FirstTag(ctx context.Context, arg FirstTagParams) (*Tag, error)
	GetAnimeGenre(ctx context.Context, arg GetAnimeGenreParams) (*AnimeGenre, error)
	GetAnimeGenresWithAnime(ctx context.Context, arg GetAnimeGenresWithAnimeParams) ([]*Genre, error)
	GetAnimeGenresWithProvider(ctx context.Context, provider enum.AnimeProvider) ([]*Genre, error)
	GetAnimeGenresWithProviderSlug(ctx context.Context, arg GetAnimeGenresWithProviderSlugParams) ([]*Genre, error)
	GetAnimeRecommendationsForAnimeId(ctx context.Context, animeID uuid.UUID) ([]*AnimeRecommendation, error)
	GetAnimeRelationsForAnimeId(ctx context.Context, animeID uuid.UUID) ([]*AnimeRelation, error)
	GetAnimeStudio(ctx context.Context, arg GetAnimeStudioParams) (*AnimeStudio, error)
	GetAnimeStudiosWithAnime(ctx context.Context, arg GetAnimeStudiosWithAnimeParams) ([]*Studio, error)
	GetAnimeStudiosWithProvider(ctx context.Context, provider enum.AnimeProvider) ([]*Studio, error)
	GetAnimeStudiosWithProviderSlug(ctx context.Context, arg GetAnimeStudiosWithProviderSlugParams) ([]*Studio, error)
	GetAnimeTag(ctx context.Context, arg GetAnimeTagParams) (*AnimeTag, error)
	GetAnimeTagsWithAnime(ctx context.Context, arg GetAnimeTagsWithAnimeParams) ([]*Tag, error)
	GetAnimeTagsWithProvider(ctx context.Context, provider enum.AnimeProvider) ([]*Tag, error)
	GetAnimeTagsWithProviderSlug(ctx context.Context, arg GetAnimeTagsWithProviderSlugParams) ([]*Tag, error)
	InsertAnime(ctx context.Context, arg []InsertAnimeParams) *InsertAnimeBatchResults
	InsertAnimeGenre(ctx context.Context, arg []InsertAnimeGenreParams) *InsertAnimeGenreBatchResults
	InsertAnimeMapping(ctx context.Context, arg []InsertAnimeMappingParams) *InsertAnimeMappingBatchResults
	InsertAnimeRecommendation(ctx context.Context, arg []InsertAnimeRecommendationParams) *InsertAnimeRecommendationBatchResults
	InsertAnimeRelation(ctx context.Context, arg []InsertAnimeRelationParams) *InsertAnimeRelationBatchResults
	InsertAnimeStudio(ctx context.Context, arg []InsertAnimeStudioParams) *InsertAnimeStudioBatchResults
	InsertAnimeTag(ctx context.Context, arg []InsertAnimeTagParams) *InsertAnimeTagBatchResults
	InsertAnimeTitle(ctx context.Context, arg []InsertAnimeTitleParams) *InsertAnimeTitleBatchResults
	InsertGenre(ctx context.Context, arg []InsertGenreParams) *InsertGenreBatchResults
	InsertStudio(ctx context.Context, arg []InsertStudioParams) *InsertStudioBatchResults
	InsertTag(ctx context.Context, arg []InsertTagParams) *InsertTagBatchResults
	ListAnimeGenres(ctx context.Context) ([]*AnimeGenre, error)
	ListAnimeMappings(ctx context.Context) ([]*AnimeMapping, error)
	ListAnimeRecommendationsWithMappings(ctx context.Context) ([]*VwAnimeRecommendation, error)
	ListAnimeRelationsWithMappings(ctx context.Context) ([]*VwAnimeRelation, error)
	ListAnimeStudios(ctx context.Context) ([]*AnimeStudio, error)
	ListAnimeTags(ctx context.Context) ([]*AnimeTag, error)
	ListAnimeTitle(ctx context.Context) ([]*AnimeTitle, error)
	ListAnimeWithMappings(ctx context.Context) ([]*ListAnimeWithMappingsRow, error)
	ListGenres(ctx context.Context) ([]*Genre, error)
	ListStudios(ctx context.Context) ([]*Studio, error)
	ListTags(ctx context.Context) ([]*Tag, error)
	UpdateAnime(ctx context.Context, arg []UpdateAnimeParams) *UpdateAnimeBatchResults
	UpdateAnimeRecommendation(ctx context.Context, arg []UpdateAnimeRecommendationParams) *UpdateAnimeRecommendationBatchResults
	UpdateAnimeRelation(ctx context.Context, arg []UpdateAnimeRelationParams) *UpdateAnimeRelationBatchResults
	UpdateAnimeTitle(ctx context.Context, arg []UpdateAnimeTitleParams) *UpdateAnimeTitleBatchResults
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) DeleteAnime

func (q *Queries) DeleteAnime(ctx context.Context, arg DeleteAnimeParams) (int64, error)

func (*Queries) DeleteAnimeGenre

func (q *Queries) DeleteAnimeGenre(ctx context.Context, arg DeleteAnimeGenreParams) (int64, error)

func (*Queries) DeleteAnimeRecommendation

func (q *Queries) DeleteAnimeRecommendation(ctx context.Context, ids []uuid.UUID) (int64, error)

func (*Queries) DeleteAnimeRelation

func (q *Queries) DeleteAnimeRelation(ctx context.Context, ids []uuid.UUID) (int64, error)

func (*Queries) DeleteAnimeStudio

func (q *Queries) DeleteAnimeStudio(ctx context.Context, arg DeleteAnimeStudioParams) (int64, error)

func (*Queries) DeleteAnimeTag

func (q *Queries) DeleteAnimeTag(ctx context.Context, arg DeleteAnimeTagParams) (int64, error)

func (*Queries) DeleteGenre

func (q *Queries) DeleteGenre(ctx context.Context, id uuid.UUID) (int64, error)

func (*Queries) DeleteStudio

func (q *Queries) DeleteStudio(ctx context.Context, id uuid.UUID) (int64, error)

func (*Queries) DeleteTag

func (q *Queries) DeleteTag(ctx context.Context, id uuid.UUID) (int64, error)

func (*Queries) FilterAnime

func (q *Queries) FilterAnime(ctx context.Context, arg FilterAnimeParams) ([]*Anime, error)

func (*Queries) FilterAnimeMapping

func (q *Queries) FilterAnimeMapping(ctx context.Context, arg FilterAnimeMappingParams) ([]*AnimeMapping, error)

func (*Queries) FindGenre

func (q *Queries) FindGenre(ctx context.Context, arg FindGenreParams) ([]*Genre, error)

func (*Queries) FindStudio

func (q *Queries) FindStudio(ctx context.Context, arg FindStudioParams) ([]*Studio, error)

func (*Queries) FindTag

func (q *Queries) FindTag(ctx context.Context, arg FindTagParams) ([]*Tag, error)

func (*Queries) FirstGenre

func (q *Queries) FirstGenre(ctx context.Context, arg FirstGenreParams) (*Genre, error)

func (*Queries) FirstStudio

func (q *Queries) FirstStudio(ctx context.Context, arg FirstStudioParams) (*Studio, error)

func (*Queries) FirstTag

func (q *Queries) FirstTag(ctx context.Context, arg FirstTagParams) (*Tag, error)

func (*Queries) GetAnimeGenre

func (q *Queries) GetAnimeGenre(ctx context.Context, arg GetAnimeGenreParams) (*AnimeGenre, error)

func (*Queries) GetAnimeGenresWithAnime

func (q *Queries) GetAnimeGenresWithAnime(ctx context.Context, arg GetAnimeGenresWithAnimeParams) ([]*Genre, error)

func (*Queries) GetAnimeGenresWithProvider

func (q *Queries) GetAnimeGenresWithProvider(ctx context.Context, provider enum.AnimeProvider) ([]*Genre, error)

func (*Queries) GetAnimeGenresWithProviderSlug

func (q *Queries) GetAnimeGenresWithProviderSlug(ctx context.Context, arg GetAnimeGenresWithProviderSlugParams) ([]*Genre, error)

func (*Queries) GetAnimeRecommendationsForAnimeId

func (q *Queries) GetAnimeRecommendationsForAnimeId(ctx context.Context, animeID uuid.UUID) ([]*AnimeRecommendation, error)

func (*Queries) GetAnimeRelationsForAnimeId

func (q *Queries) GetAnimeRelationsForAnimeId(ctx context.Context, animeID uuid.UUID) ([]*AnimeRelation, error)

func (*Queries) GetAnimeStudio

func (q *Queries) GetAnimeStudio(ctx context.Context, arg GetAnimeStudioParams) (*AnimeStudio, error)

func (*Queries) GetAnimeStudiosWithAnime

func (q *Queries) GetAnimeStudiosWithAnime(ctx context.Context, arg GetAnimeStudiosWithAnimeParams) ([]*Studio, error)

func (*Queries) GetAnimeStudiosWithProvider

func (q *Queries) GetAnimeStudiosWithProvider(ctx context.Context, provider enum.AnimeProvider) ([]*Studio, error)

func (*Queries) GetAnimeStudiosWithProviderSlug

func (q *Queries) GetAnimeStudiosWithProviderSlug(ctx context.Context, arg GetAnimeStudiosWithProviderSlugParams) ([]*Studio, error)

func (*Queries) GetAnimeTag

func (q *Queries) GetAnimeTag(ctx context.Context, arg GetAnimeTagParams) (*AnimeTag, error)

func (*Queries) GetAnimeTagsWithAnime

func (q *Queries) GetAnimeTagsWithAnime(ctx context.Context, arg GetAnimeTagsWithAnimeParams) ([]*Tag, error)

func (*Queries) GetAnimeTagsWithProvider

func (q *Queries) GetAnimeTagsWithProvider(ctx context.Context, provider enum.AnimeProvider) ([]*Tag, error)

func (*Queries) GetAnimeTagsWithProviderSlug

func (q *Queries) GetAnimeTagsWithProviderSlug(ctx context.Context, arg GetAnimeTagsWithProviderSlugParams) ([]*Tag, error)

func (*Queries) InsertAnime

func (q *Queries) InsertAnime(ctx context.Context, arg []InsertAnimeParams) *InsertAnimeBatchResults

func (*Queries) InsertAnimeGenre

func (*Queries) InsertAnimeMapping

func (*Queries) InsertAnimeRelation

func (*Queries) InsertAnimeStudio

func (*Queries) InsertAnimeTag

func (*Queries) InsertAnimeTitle

func (*Queries) InsertGenre

func (q *Queries) InsertGenre(ctx context.Context, arg []InsertGenreParams) *InsertGenreBatchResults

func (*Queries) InsertStudio

func (q *Queries) InsertStudio(ctx context.Context, arg []InsertStudioParams) *InsertStudioBatchResults

func (*Queries) InsertTag

func (q *Queries) InsertTag(ctx context.Context, arg []InsertTagParams) *InsertTagBatchResults

func (*Queries) ListAnimeGenres

func (q *Queries) ListAnimeGenres(ctx context.Context) ([]*AnimeGenre, error)

func (*Queries) ListAnimeMappings

func (q *Queries) ListAnimeMappings(ctx context.Context) ([]*AnimeMapping, error)

func (*Queries) ListAnimeRecommendationsWithMappings

func (q *Queries) ListAnimeRecommendationsWithMappings(ctx context.Context) ([]*VwAnimeRecommendation, error)

func (*Queries) ListAnimeRelationsWithMappings

func (q *Queries) ListAnimeRelationsWithMappings(ctx context.Context) ([]*VwAnimeRelation, error)

func (*Queries) ListAnimeStudios

func (q *Queries) ListAnimeStudios(ctx context.Context) ([]*AnimeStudio, error)

func (*Queries) ListAnimeTags

func (q *Queries) ListAnimeTags(ctx context.Context) ([]*AnimeTag, error)

func (*Queries) ListAnimeTitle

func (q *Queries) ListAnimeTitle(ctx context.Context) ([]*AnimeTitle, error)

func (*Queries) ListAnimeWithMappings

func (q *Queries) ListAnimeWithMappings(ctx context.Context) ([]*ListAnimeWithMappingsRow, error)

func (*Queries) ListGenres

func (q *Queries) ListGenres(ctx context.Context) ([]*Genre, error)

func (*Queries) ListStudios

func (q *Queries) ListStudios(ctx context.Context) ([]*Studio, error)

func (*Queries) ListTags

func (q *Queries) ListTags(ctx context.Context) ([]*Tag, error)

func (*Queries) UpdateAnime

func (q *Queries) UpdateAnime(ctx context.Context, arg []UpdateAnimeParams) *UpdateAnimeBatchResults

func (*Queries) UpdateAnimeRelation

func (*Queries) UpdateAnimeTitle

func (*Queries) WithTx

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

type Studio

type Studio struct {
	ID        uuid.UUID
	Provider  enum.AnimeProvider
	CreatedAt time.Time
	UpdatedAt time.Time
	Name      string
	Slug      string
}

type Tag

type Tag struct {
	ID          uuid.UUID
	Provider    enum.AnimeProvider
	CreatedAt   time.Time
	UpdatedAt   time.Time
	Name        string
	Slug        string
	Description *string
}

type UpdateAnimeBatchResults

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

func (*UpdateAnimeBatchResults) Close

func (b *UpdateAnimeBatchResults) Close() error

func (*UpdateAnimeBatchResults) Query

func (b *UpdateAnimeBatchResults) Query(f func(int, []uuid.UUID, error))

type UpdateAnimeParams

type UpdateAnimeParams struct {
	Poster          *string
	Banner          *string
	Score           *int
	CountryOfOrigin *string
	AgeRating       *string
	Description     *string
	SeasonYear      *int
	StartDate       *time.Time
	EndDate         *time.Time
	Status          *enum.Status
	Format          *enum.Format
	Season          *enum.Season
	ID              uuid.UUID
}

type UpdateAnimeRecommendationBatchResults

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

func (*UpdateAnimeRecommendationBatchResults) Close

func (*UpdateAnimeRecommendationBatchResults) Exec

type UpdateAnimeRecommendationParams

type UpdateAnimeRecommendationParams struct {
	Rating *float64
	ID     uuid.UUID
}

type UpdateAnimeRelationBatchResults

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

func (*UpdateAnimeRelationBatchResults) Close

func (*UpdateAnimeRelationBatchResults) Exec

func (b *UpdateAnimeRelationBatchResults) Exec(f func(int, error))

type UpdateAnimeRelationParams

type UpdateAnimeRelationParams struct {
	RelationType *enum.AnimeRelationType
	ID           uuid.UUID
}

type UpdateAnimeTitleBatchResults

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

func (*UpdateAnimeTitleBatchResults) Close

func (*UpdateAnimeTitleBatchResults) Exec

func (b *UpdateAnimeTitleBatchResults) Exec(f func(int, error))

type UpdateAnimeTitleParams

type UpdateAnimeTitleParams struct {
	Name      *string
	Language  *string
	TitleType *enum.AnimeTitleType
	ID        uuid.UUID
}

type VwAnimeRecommendation

type VwAnimeRecommendation struct {
	AnimeID            uuid.UUID
	RecommendedAnimeID uuid.UUID
	Rating             float64
	CreatedAt          time.Time
	UpdatedAt          time.Time
}

type VwAnimeRelation

type VwAnimeRelation struct {
	AnimeID        uuid.UUID
	RelatedAnimeID uuid.UUID
	RelationType   enum.AnimeRelationType
	CreatedAt      time.Time
	UpdatedAt      time.Time
}

Jump to

Keyboard shortcuts

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