db

package
v0.0.0-...-d4218d0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CodeVersion = 3

Variables

This section is empty.

Functions

func Close

func Close()

func Init

func Init()

func Pool

func Pool() *pgxpool.Pool

Types

type AddCommentParams

type AddCommentParams struct {
	UserID        int32         `json:"userID"`
	BookGroupID   int32         `json:"bookGroupID"`
	BookChapterID sql.NullInt32 `json:"bookChapterID"`
	Content       string        `json:"content"`
}

type AuthorsByBookGroupParams

type AuthorsByBookGroupParams struct {
	BookGroupID int32 `json:"bookGroupID"`
	Offset      int32 `json:"offset"`
	Limit       int32 `json:"limit"`
}

type BookAuthor

type BookAuthor struct {
	ID            int32          `json:"id"`
	Name          string         `json:"name"`
	Aliases       sql.NullString `json:"aliases"`
	Description   sql.NullString `json:"description"`
	AvatarImageID sql.NullInt32  `json:"avatarImageID"`
	BookAuthorTsv sql.NullString `json:"bookAuthorTsv"`
}

type BookAuthorByIdRow

type BookAuthorByIdRow struct {
	ID            int32          `json:"id"`
	Name          string         `json:"name"`
	Aliases       sql.NullString `json:"aliases"`
	Description   sql.NullString `json:"description"`
	AvatarImageID sql.NullInt32  `json:"avatarImageID"`
}

type BookAuthorsParams

type BookAuthorsParams struct {
	Offset int32 `json:"offset"`
	Limit  int32 `json:"limit"`
}

type BookAuthorsRow

type BookAuthorsRow struct {
	ID            int32          `json:"id"`
	Name          string         `json:"name"`
	Aliases       sql.NullString `json:"aliases"`
	Description   sql.NullString `json:"description"`
	AvatarImageID sql.NullInt32  `json:"avatarImageID"`
}

type BookChapter

type BookChapter struct {
	ID            int32          `json:"id"`
	DateCreated   time.Time      `json:"dateCreated"`
	ChapterNumber float64        `json:"chapterNumber"`
	Name          sql.NullString `json:"name"`
	TextContent   sql.NullString `json:"textContent"`
	Type          string         `json:"type"`
	BookGroupID   int32          `json:"bookGroupID"`
	OwnerID       int32          `json:"ownerID"`
}

type BookChapterImage

type BookChapterImage struct {
	BookChapterID int32 `json:"bookChapterID"`
	ImageID       int32 `json:"imageID"`
	Rank          int32 `json:"rank"`
}

type BookChapterView

type BookChapterView struct {
	Count         sql.NullInt32 `json:"count"`
	ViewDate      time.Time     `json:"viewDate"`
	BookChapterID int32         `json:"bookChapterID"`
}

type BookChaptersByBookGroupIdParams

type BookChaptersByBookGroupIdParams struct {
	BookGroupID int32 `json:"bookGroupID"`
	Offset      int32 `json:"offset"`
	Limit       int32 `json:"limit"`
}

type BookComment

type BookComment struct {
	ID            int32         `json:"id"`
	Content       string        `json:"content"`
	UserID        int32         `json:"userID"`
	BookGroupID   int32         `json:"bookGroupID"`
	BookChapterID sql.NullInt32 `json:"bookChapterID"`
	PostedTime    time.Time     `json:"postedTime"`
}

type BookGroup

type BookGroup struct {
	ID                int32          `json:"id"`
	Title             string         `json:"title"`
	Aliases           sql.NullString `json:"aliases"`
	Description       sql.NullString `json:"description"`
	DateCreated       sql.NullTime   `json:"dateCreated"`
	OwnerID           int32          `json:"ownerID"`
	PrimaryCoverArtID sql.NullInt32  `json:"primaryCoverArtID"`
	BookGroupTsv      interface{}    `json:"bookGroupTsv"`
}

type BookGroupAltTitle

type BookGroupAltTitle struct {
	Title  string `json:"title"`
	BookID int32  `json:"bookID"`
}

type BookGroupArt

type BookGroupArt struct {
	BookGroupID int32 `json:"bookGroupID"`
	ImageID     int32 `json:"imageID"`
}

type BookGroupAuthor

type BookGroupAuthor struct {
	BookGroupID  int32 `json:"bookGroupID"`
	BookAuthorID int32 `json:"bookAuthorID"`
}

type BookGroupAuthorParams

type BookGroupAuthorParams struct {
	BookGroupID  int32 `json:"bookGroupID"`
	BookAuthorID int32 `json:"bookAuthorID"`
}

type BookGroupByIdRow

type BookGroupByIdRow struct {
	ID                int32          `json:"id"`
	Title             string         `json:"title"`
	Aliases           sql.NullString `json:"aliases"`
	Description       sql.NullString `json:"description"`
	DateCreated       sql.NullTime   `json:"dateCreated"`
	OwnerID           int32          `json:"ownerID"`
	PrimaryCoverArtID sql.NullInt32  `json:"primaryCoverArtID"`
}

type BookGroupGenre

type BookGroupGenre struct {
	BookGroupID int32 `json:"bookGroupID"`
	GenreID     int32 `json:"genreID"`
}

type BookGroupGenreParams

type BookGroupGenreParams struct {
	BookGroupID int32 `json:"bookGroupID"`
	GenreID     int32 `json:"genreID"`
}

type BookGroupLike

type BookGroupLike struct {
	Point       int32 `json:"point"`
	UserID      int32 `json:"userID"`
	BookGroupID int32 `json:"bookGroupID"`
}

type BookGroupsByAuthorRow

type BookGroupsByAuthorRow struct {
	ID            int32       `json:"id"`
	Image         interface{} `json:"image"`
	Title         interface{} `json:"title"`
	LatestChapter interface{} `json:"latestChapter"`
	LastUpdated   interface{} `json:"lastUpdated"`
	Views         interface{} `json:"views"`
	Comments      int64       `json:"comments"`
	Likes         interface{} `json:"likes"`
}

type BookGroupsByGenreParams

type BookGroupsByGenreParams struct {
	GenreID int32 `json:"genreID"`
	Offset  int32 `json:"offset"`
	Limit   int32 `json:"limit"`
}

type BookGroupsByGenreRow

type BookGroupsByGenreRow struct {
	ID            int32       `json:"id"`
	Image         interface{} `json:"image"`
	Title         interface{} `json:"title"`
	LatestChapter interface{} `json:"latestChapter"`
	LastUpdated   interface{} `json:"lastUpdated"`
	Views         interface{} `json:"views"`
	Comments      int64       `json:"comments"`
	Likes         interface{} `json:"likes"`
}

type BookGroupsByTitleParams

type BookGroupsByTitleParams struct {
	Unaccent string `json:"unaccent"`
	Offset   int32  `json:"offset"`
	Limit    int32  `json:"limit"`
}

type BookGroupsByTitleRow

type BookGroupsByTitleRow struct {
	ID                int32          `json:"id"`
	Title             string         `json:"title"`
	Aliases           sql.NullString `json:"aliases"`
	Description       sql.NullString `json:"description"`
	DateCreated       sql.NullTime   `json:"dateCreated"`
	OwnerID           int32          `json:"ownerID"`
	PrimaryCoverArtID sql.NullInt32  `json:"primaryCoverArtID"`
}

type BookGroupsByUserRow

type BookGroupsByUserRow struct {
	ID            int32       `json:"id"`
	Image         interface{} `json:"image"`
	Title         interface{} `json:"title"`
	LatestChapter interface{} `json:"latestChapter"`
	LastUpdated   interface{} `json:"lastUpdated"`
	Views         interface{} `json:"views"`
	Comments      int64       `json:"comments"`
	Likes         interface{} `json:"likes"`
}

type BookGroupsTopViewAllRow

type BookGroupsTopViewAllRow struct {
	ID            int32       `json:"id"`
	Image         interface{} `json:"image"`
	Title         string      `json:"title"`
	LatestChapter interface{} `json:"latestChapter"`
	LastUpdated   interface{} `json:"lastUpdated"`
	Views         interface{} `json:"views"`
	Comments      int64       `json:"comments"`
	Likes         interface{} `json:"likes"`
}

type BookGroupsTopViewMonthRow

type BookGroupsTopViewMonthRow struct {
	ID            int32       `json:"id"`
	Image         interface{} `json:"image"`
	Title         string      `json:"title"`
	LatestChapter interface{} `json:"latestChapter"`
	LastUpdated   interface{} `json:"lastUpdated"`
	Views         interface{} `json:"views"`
	Comments      int64       `json:"comments"`
	Likes         interface{} `json:"likes"`
}

type BookGroupsTopViewWeekRow

type BookGroupsTopViewWeekRow struct {
	ID            int32       `json:"id"`
	Image         interface{} `json:"image"`
	Title         string      `json:"title"`
	LatestChapter interface{} `json:"latestChapter"`
	LastUpdated   interface{} `json:"lastUpdated"`
	Views         interface{} `json:"views"`
	Comments      int64       `json:"comments"`
	Likes         interface{} `json:"likes"`
}

type BookGroupsTopViewYearRow

type BookGroupsTopViewYearRow struct {
	ID            int32       `json:"id"`
	Image         interface{} `json:"image"`
	Title         string      `json:"title"`
	LatestChapter interface{} `json:"latestChapter"`
	LastUpdated   interface{} `json:"lastUpdated"`
	Views         interface{} `json:"views"`
	Comments      int64       `json:"comments"`
	Likes         interface{} `json:"likes"`
}

type CheckAlreadyDislikeParams

type CheckAlreadyDislikeParams struct {
	UserID      int32 `json:"userID"`
	BookGroupID int32 `json:"bookGroupID"`
}

type CheckAlreadyLikeParams

type CheckAlreadyLikeParams struct {
	UserID      int32 `json:"userID"`
	BookGroupID int32 `json:"bookGroupID"`
}

type CheckImageExistsByHashParams

type CheckImageExistsByHashParams struct {
	Md5  string `json:"md5"`
	Sha1 string `json:"sha1"`
}

type CheckPermissionOnUserIdParams

type CheckPermissionOnUserIdParams struct {
	Module string `json:"module"`
	Action string `json:"action"`
	ID     int32  `json:"id"`
}

type CheckUnlikeParams

type CheckUnlikeParams struct {
	UserID      int32 `json:"userID"`
	BookGroupID int32 `json:"bookGroupID"`
}

type CompleteOauthAccountParams

type CompleteOauthAccountParams struct {
	ID            int32          `json:"id"`
	UserName      sql.NullString `json:"userName"`
	AvatarImageID sql.NullInt32  `json:"avatarImageID"`
	RoleID        int32          `json:"roleID"`
}

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 DeleteBookGroupAuthorParams

type DeleteBookGroupAuthorParams struct {
	BookGroupID  int32 `json:"bookGroupID"`
	BookAuthorID int32 `json:"bookAuthorID"`
}

type DeleteBookGroupGenreParams

type DeleteBookGroupGenreParams struct {
	BookGroupID int32 `json:"bookGroupID"`
	GenreID     int32 `json:"genreID"`
}

type DisLikesParams

type DisLikesParams struct {
	UserID      int32 `json:"userID"`
	BookGroupID int32 `json:"bookGroupID"`
}

type Genre

type Genre struct {
	ID          int32          `json:"id"`
	Name        string         `json:"name"`
	Description sql.NullString `json:"description"`
	ImageID     sql.NullInt32  `json:"imageID"`
}

type GenresByBookGroupParams

type GenresByBookGroupParams struct {
	BookGroupID int32 `json:"bookGroupID"`
	Offset      int32 `json:"offset"`
	Limit       int32 `json:"limit"`
}

type GetAllGenreRow

type GetAllGenreRow struct {
	Name string `json:"name"`
	ID   int32  `json:"id"`
}

type GetBookAuthorRow

type GetBookAuthorRow struct {
	Name        string         `json:"name"`
	Description sql.NullString `json:"description"`
	Aliases     sql.NullString `json:"aliases"`
	Avatar      sql.NullString `json:"avatar"`
	Avatarid    sql.NullInt32  `json:"avatarid"`
}

type GetBookChapterCommentsParams

type GetBookChapterCommentsParams struct {
	BookChapterID sql.NullInt32 `json:"bookChapterID"`
	Offset        int32         `json:"offset"`
}

type GetBookChapterCommentsRow

type GetBookChapterCommentsRow struct {
	ID            int32           `json:"id"`
	Content       string          `json:"content"`
	PostedTime    time.Time       `json:"postedTime"`
	Userid        int32           `json:"userid"`
	UserName      sql.NullString  `json:"userName"`
	Avatarpath    sql.NullString  `json:"avatarpath"`
	Chapterid     sql.NullInt32   `json:"chapterid"`
	ChapterNumber sql.NullFloat64 `json:"chapterNumber"`
}

type GetBookChapterOwnerRow

type GetBookChapterOwnerRow struct {
	ID       int32          `json:"id"`
	UserName sql.NullString `json:"userName"`
}

type GetBookGroupAndChapterCommentsParams

type GetBookGroupAndChapterCommentsParams struct {
	BookGroupID   int32         `json:"bookGroupID"`
	BookChapterID sql.NullInt32 `json:"bookChapterID"`
	Offset        int32         `json:"offset"`
}

type GetBookGroupAndChapterCommentsRow

type GetBookGroupAndChapterCommentsRow struct {
	ID            int32           `json:"id"`
	Content       string          `json:"content"`
	PostedTime    time.Time       `json:"postedTime"`
	Userid        int32           `json:"userid"`
	UserName      sql.NullString  `json:"userName"`
	Avatarpath    sql.NullString  `json:"avatarpath"`
	Chapterid     sql.NullInt32   `json:"chapterid"`
	ChapterNumber sql.NullFloat64 `json:"chapterNumber"`
}

type GetBookGroupAuthorsRow

type GetBookGroupAuthorsRow struct {
	ID   int32  `json:"id"`
	Name string `json:"name"`
}

type GetBookGroupChaptersRow

type GetBookGroupChaptersRow struct {
	ChapterNumber float64        `json:"chapterNumber"`
	Name          sql.NullString `json:"name"`
	Chapterid     int32          `json:"chapterid"`
	DateCreated   time.Time      `json:"dateCreated"`
	Userid        int32          `json:"userid"`
	UserName      sql.NullString `json:"userName"`
	Totalview     interface{}    `json:"totalview"`
}

type GetBookGroupCommentsParams

type GetBookGroupCommentsParams struct {
	BookGroupID int32 `json:"bookGroupID"`
	Offset      int32 `json:"offset"`
}

type GetBookGroupCommentsRow

type GetBookGroupCommentsRow struct {
	ID            int32           `json:"id"`
	Content       string          `json:"content"`
	PostedTime    time.Time       `json:"postedTime"`
	Userid        int32           `json:"userid"`
	UserName      sql.NullString  `json:"userName"`
	Avatarpath    sql.NullString  `json:"avatarpath"`
	Chapterid     sql.NullInt32   `json:"chapterid"`
	ChapterNumber sql.NullFloat64 `json:"chapterNumber"`
}

type GetBookGroupCoverArtsRow

type GetBookGroupCoverArtsRow struct {
	ID   int32  `json:"id"`
	Path string `json:"path"`
}

type GetBookGroupGenresRow

type GetBookGroupGenresRow struct {
	ID   int32  `json:"id"`
	Name string `json:"name"`
}

type GetCommentChapterInfoRow

type GetCommentChapterInfoRow struct {
	ID            int32   `json:"id"`
	ChapterNumber float64 `json:"chapterNumber"`
}

type GetCommenterRow

type GetCommenterRow struct {
	ID       int32          `json:"id"`
	UserName sql.NullString `json:"userName"`
	Path     sql.NullString `json:"path"`
}

type GetImageBasedOnHashParams

type GetImageBasedOnHashParams struct {
	Md5  string `json:"md5"`
	Sha1 string `json:"sha1"`
}

type GetLatestCommentsRow

type GetLatestCommentsRow struct {
	ID            int32           `json:"id"`
	Content       string          `json:"content"`
	PostedTime    time.Time       `json:"postedTime"`
	Userid        int32           `json:"userid"`
	UserName      sql.NullString  `json:"userName"`
	Avatarpath    sql.NullString  `json:"avatarpath"`
	Chapterid     sql.NullInt32   `json:"chapterid"`
	Chaptername   sql.NullString  `json:"chaptername"`
	ChapterNumber sql.NullFloat64 `json:"chapterNumber"`
	Bookid        int32           `json:"bookid"`
	Bookname      string          `json:"bookname"`
}

type GetTotalBookGroupAndChapterCommentsParams

type GetTotalBookGroupAndChapterCommentsParams struct {
	BookGroupID   int32         `json:"bookGroupID"`
	BookChapterID sql.NullInt32 `json:"bookChapterID"`
}

type GetUserInfoRow

type GetUserInfoRow struct {
	ID         int32          `json:"id"`
	UserName   sql.NullString `json:"userName"`
	Email      string         `json:"email"`
	Password   sql.NullString `json:"password"`
	Role       string         `json:"role"`
	Summary    sql.NullString `json:"summary"`
	Avatarpath sql.NullString `json:"avatarpath"`
	Avatarid   sql.NullInt32  `json:"avatarid"`
}

type Image

type Image struct {
	ID          int32          `json:"id"`
	Md5         string         `json:"md5"`
	Sha1        string         `json:"sha1"`
	Path        string         `json:"path"`
	Name        sql.NullString `json:"name"`
	Description sql.NullString `json:"description"`
}

type ImagesByBookChapterRow

type ImagesByBookChapterRow struct {
	ID   int32  `json:"id"`
	Path string `json:"path"`
}

type InsertBookAuthorParams

type InsertBookAuthorParams struct {
	Name          string         `json:"name"`
	Aliases       sql.NullString `json:"aliases"`
	Description   sql.NullString `json:"description"`
	AvatarImageID sql.NullInt32  `json:"avatarImageID"`
}

type InsertBookChapterImageParams

type InsertBookChapterImageParams struct {
	BookChapterID int32 `json:"bookChapterID"`
	ImageID       int32 `json:"imageID"`
	Rank          int32 `json:"rank"`
}

type InsertBookChapterParams

type InsertBookChapterParams struct {
	ChapterNumber float64        `json:"chapterNumber"`
	Name          sql.NullString `json:"name"`
	TextContent   sql.NullString `json:"textContent"`
	Type          string         `json:"type"`
	BookGroupID   int32          `json:"bookGroupID"`
	OwnerID       int32          `json:"ownerID"`
}

type InsertBookGroupArtParams

type InsertBookGroupArtParams struct {
	BookGroupID int32 `json:"bookGroupID"`
	ImageID     int32 `json:"imageID"`
}

type InsertBookGroupAuthorParams

type InsertBookGroupAuthorParams struct {
	BookGroupID  int32 `json:"bookGroupID"`
	BookAuthorID int32 `json:"bookAuthorID"`
}

type InsertBookGroupGenreParams

type InsertBookGroupGenreParams struct {
	BookGroupID int32 `json:"bookGroupID"`
	GenreID     int32 `json:"genreID"`
}

type InsertBookGroupParams

type InsertBookGroupParams struct {
	Title             string         `json:"title"`
	Aliases           sql.NullString `json:"aliases"`
	Description       sql.NullString `json:"description"`
	OwnerID           int32          `json:"ownerID"`
	PrimaryCoverArtID sql.NullInt32  `json:"primaryCoverArtID"`
}

type InsertBookGroupRow

type InsertBookGroupRow struct {
	ID                int32          `json:"id"`
	Title             string         `json:"title"`
	Aliases           sql.NullString `json:"aliases"`
	Description       sql.NullString `json:"description"`
	DateCreated       sql.NullTime   `json:"dateCreated"`
	OwnerID           int32          `json:"ownerID"`
	PrimaryCoverArtID sql.NullInt32  `json:"primaryCoverArtID"`
}

type InsertGenreParams

type InsertGenreParams struct {
	Name        string         `json:"name"`
	Description sql.NullString `json:"description"`
	ImageID     sql.NullInt32  `json:"imageID"`
}

type InsertImageParams

type InsertImageParams struct {
	Md5         string         `json:"md5"`
	Sha1        string         `json:"sha1"`
	Path        string         `json:"path"`
	Name        sql.NullString `json:"name"`
	Description sql.NullString `json:"description"`
}

type InsertNewRoleParams

type InsertNewRoleParams struct {
	Name        string         `json:"name"`
	Description sql.NullString `json:"description"`
}

type InsertUserParams

type InsertUserParams struct {
	UserName sql.NullString `json:"userName"`
	Password sql.NullString `json:"password"`
	Email    string         `json:"email"`
	RoleName string         `json:"roleName"`
}

type LatestBookGroupsParams

type LatestBookGroupsParams struct {
	Offset int32 `json:"offset"`
	Limit  int32 `json:"limit"`
}

type LatestBookGroupsRow

type LatestBookGroupsRow struct {
	ID            int32       `json:"id"`
	Image         interface{} `json:"image"`
	Title         string      `json:"title"`
	LatestChapter interface{} `json:"latestChapter"`
	LastUpdated   interface{} `json:"lastUpdated"`
	Views         interface{} `json:"views"`
	Comments      int64       `json:"comments"`
	Likes         interface{} `json:"likes"`
}

type LikesParams

type LikesParams struct {
	UserID      int32 `json:"userID"`
	BookGroupID int32 `json:"bookGroupID"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AddComment

func (q *Queries) AddComment(ctx context.Context, arg AddCommentParams) error

func (*Queries) AllBookGroupGenre

func (q *Queries) AllBookGroupGenre(ctx context.Context) ([]BookGroupGenre, error)

func (*Queries) AuthorsByBookGroup

func (q *Queries) AuthorsByBookGroup(ctx context.Context, arg AuthorsByBookGroupParams) ([]int32, error)

func (*Queries) BookAuthorById

func (q *Queries) BookAuthorById(ctx context.Context, id int32) (BookAuthorByIdRow, error)

func (*Queries) BookAuthors

func (q *Queries) BookAuthors(ctx context.Context, arg BookAuthorsParams) ([]BookAuthorsRow, error)

func (*Queries) BookChapterById

func (q *Queries) BookChapterById(ctx context.Context, id int32) (BookChapter, error)

func (*Queries) BookChaptersByBookGroupId

func (q *Queries) BookChaptersByBookGroupId(ctx context.Context, arg BookChaptersByBookGroupIdParams) ([]BookChapter, error)

func (*Queries) BookGroupAuthor

func (q *Queries) BookGroupAuthor(ctx context.Context, arg BookGroupAuthorParams) (bool, error)

func (*Queries) BookGroupById

func (q *Queries) BookGroupById(ctx context.Context, id int32) (BookGroupByIdRow, error)

func (*Queries) BookGroupGenre

func (q *Queries) BookGroupGenre(ctx context.Context, arg BookGroupGenreParams) (bool, error)

func (*Queries) BookGroupsByAuthor

func (q *Queries) BookGroupsByAuthor(ctx context.Context, bookAuthorID int32) ([]BookGroupsByAuthorRow, error)

func (*Queries) BookGroupsByGenre

func (q *Queries) BookGroupsByGenre(ctx context.Context, arg BookGroupsByGenreParams) ([]BookGroupsByGenreRow, error)

func (*Queries) BookGroupsByTitle

func (q *Queries) BookGroupsByTitle(ctx context.Context, arg BookGroupsByTitleParams) ([]BookGroupsByTitleRow, error)

func (*Queries) BookGroupsByUser

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

func (*Queries) BookGroupsTopViewAll

func (q *Queries) BookGroupsTopViewAll(ctx context.Context, limit int32) ([]BookGroupsTopViewAllRow, error)

func (*Queries) BookGroupsTopViewMonth

func (q *Queries) BookGroupsTopViewMonth(ctx context.Context, limit int32) ([]BookGroupsTopViewMonthRow, error)

func (*Queries) BookGroupsTopViewWeek

func (q *Queries) BookGroupsTopViewWeek(ctx context.Context, limit int32) ([]BookGroupsTopViewWeekRow, error)

func (*Queries) BookGroupsTopViewYear

func (q *Queries) BookGroupsTopViewYear(ctx context.Context, limit int32) ([]BookGroupsTopViewYearRow, error)

func (*Queries) CheckAlreadyDislike

func (q *Queries) CheckAlreadyDislike(ctx context.Context, arg CheckAlreadyDislikeParams) (bool, error)

func (*Queries) CheckAlreadyLike

func (q *Queries) CheckAlreadyLike(ctx context.Context, arg CheckAlreadyLikeParams) (bool, error)

func (*Queries) CheckAuthorExistById

func (q *Queries) CheckAuthorExistById(ctx context.Context, id int32) (bool, error)

func (*Queries) CheckAuthorExistByName

func (q *Queries) CheckAuthorExistByName(ctx context.Context, name string) (bool, error)

func (*Queries) CheckBookGroupById

func (q *Queries) CheckBookGroupById(ctx context.Context, id int32) (bool, error)

func (*Queries) CheckEmailExist

func (q *Queries) CheckEmailExist(ctx context.Context, email string) (bool, error)

func (*Queries) CheckGenreExistById

func (q *Queries) CheckGenreExistById(ctx context.Context, id int32) (bool, error)

func (*Queries) CheckIfCommentExist

func (q *Queries) CheckIfCommentExist(ctx context.Context, id int32) (bool, error)

func (*Queries) CheckImageExistById

func (q *Queries) CheckImageExistById(ctx context.Context, id int32) (bool, error)

func (*Queries) CheckImageExistsByHash

func (q *Queries) CheckImageExistsByHash(ctx context.Context, arg CheckImageExistsByHashParams) (bool, error)

func (*Queries) CheckPermissionOnUserId

func (q *Queries) CheckPermissionOnUserId(ctx context.Context, arg CheckPermissionOnUserIdParams) (bool, error)

func (*Queries) CheckUnlike

func (q *Queries) CheckUnlike(ctx context.Context, arg CheckUnlikeParams) (bool, error)

func (*Queries) CheckUsernameExist

func (q *Queries) CheckUsernameExist(ctx context.Context, userName sql.NullString) (bool, error)

func (*Queries) ClearTempImages

func (q *Queries) ClearTempImages(ctx context.Context) ([]int32, error)

func (*Queries) CompleteOauthAccount

func (q *Queries) CompleteOauthAccount(ctx context.Context, arg CompleteOauthAccountParams) error

func (*Queries) CountCommentInBookGroup

func (q *Queries) CountCommentInBookGroup(ctx context.Context, bookGroupID int32) (int64, error)

func (*Queries) DelBookGroupAuthorsByAuthor

func (q *Queries) DelBookGroupAuthorsByAuthor(ctx context.Context, bookAuthorID int32) error

func (*Queries) DelBookGroupAuthorsByBookGroup

func (q *Queries) DelBookGroupAuthorsByBookGroup(ctx context.Context, bookGroupID int32) error

func (*Queries) DelBookGroupGenresByBookGroup

func (q *Queries) DelBookGroupGenresByBookGroup(ctx context.Context, bookGroupID int32) error

func (*Queries) DelBookGroupGenresByGenre

func (q *Queries) DelBookGroupGenresByGenre(ctx context.Context, genreID int32) error

func (*Queries) DeleteBookAuthor

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

func (*Queries) DeleteBookChapterByBookGroupId

func (q *Queries) DeleteBookChapterByBookGroupId(ctx context.Context, bookGroupID int32) error

func (*Queries) DeleteBookChapterById

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

func (*Queries) DeleteBookGroup

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

func (*Queries) DeleteBookGroupAuthor

func (q *Queries) DeleteBookGroupAuthor(ctx context.Context, arg DeleteBookGroupAuthorParams) error

func (*Queries) DeleteBookGroupGenre

func (q *Queries) DeleteBookGroupGenre(ctx context.Context, arg DeleteBookGroupGenreParams) error

func (*Queries) DeleteComment

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

func (*Queries) DeleteCoverOfBookGroup

func (q *Queries) DeleteCoverOfBookGroup(ctx context.Context, bookGroupID int32) error

func (*Queries) DeleteGenre

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

func (*Queries) DeleteImage

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

func (*Queries) DeleteImageOfBookChapter

func (q *Queries) DeleteImageOfBookChapter(ctx context.Context, bookChapterID int32) error

func (*Queries) DeleteRole

func (q *Queries) DeleteRole(ctx context.Context, name string) error

func (*Queries) DeleteTempImage

func (q *Queries) DeleteTempImage(ctx context.Context, imageID int32) error

func (*Queries) DeleteUser

func (q *Queries) DeleteUser(ctx context.Context, userName sql.NullString) error

func (*Queries) DisLikes

func (q *Queries) DisLikes(ctx context.Context, arg DisLikesParams) error

func (*Queries) GenreById

func (q *Queries) GenreById(ctx context.Context, id int32) (Genre, error)

func (*Queries) GenresByBookGroup

func (q *Queries) GenresByBookGroup(ctx context.Context, arg GenresByBookGroupParams) ([]int32, error)

func (*Queries) GetAllGenre

func (q *Queries) GetAllGenre(ctx context.Context) ([]GetAllGenreRow, error)

func (*Queries) GetBookAuthor

func (q *Queries) GetBookAuthor(ctx context.Context, id int32) (GetBookAuthorRow, error)

func (*Queries) GetBookChapterComments

func (q *Queries) GetBookChapterComments(ctx context.Context, arg GetBookChapterCommentsParams) ([]GetBookChapterCommentsRow, error)

func (*Queries) GetBookChapterOwner

func (q *Queries) GetBookChapterOwner(ctx context.Context, id int32) (GetBookChapterOwnerRow, error)

func (*Queries) GetBookGroupAuthors

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

func (*Queries) GetBookGroupChapters

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

func (*Queries) GetBookGroupComments

func (q *Queries) GetBookGroupComments(ctx context.Context, arg GetBookGroupCommentsParams) ([]GetBookGroupCommentsRow, error)

func (*Queries) GetBookGroupCoverArts

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

func (*Queries) GetBookGroupGenres

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

func (*Queries) GetBookGroupView

func (q *Queries) GetBookGroupView(ctx context.Context, id int32) (interface{}, error)

func (*Queries) GetCommentChapterInfo

func (q *Queries) GetCommentChapterInfo(ctx context.Context, id int32) (GetCommentChapterInfoRow, error)

func (*Queries) GetCommenter

func (q *Queries) GetCommenter(ctx context.Context, id int32) (GetCommenterRow, error)

func (*Queries) GetCoverIdsOfBookGroup

func (q *Queries) GetCoverIdsOfBookGroup(ctx context.Context, bookGroupID int32) ([]int32, error)

func (*Queries) GetDislikes

func (q *Queries) GetDislikes(ctx context.Context, bookGroupID int32) (interface{}, error)

func (*Queries) GetImageBasedOnHash

func (q *Queries) GetImageBasedOnHash(ctx context.Context, arg GetImageBasedOnHashParams) (Image, error)

func (*Queries) GetImageBasedOnId

func (q *Queries) GetImageBasedOnId(ctx context.Context, id int32) (Image, error)

func (*Queries) GetLatestComments

func (q *Queries) GetLatestComments(ctx context.Context) ([]GetLatestCommentsRow, error)

func (*Queries) GetLikes

func (q *Queries) GetLikes(ctx context.Context, bookGroupID int32) (interface{}, error)

func (*Queries) GetRoleId

func (q *Queries) GetRoleId(ctx context.Context, name string) (int32, error)

func (*Queries) GetTotalBookChapterComments

func (q *Queries) GetTotalBookChapterComments(ctx context.Context, bookChapterID sql.NullInt32) (int64, error)

func (*Queries) GetTotalBookGroupAndChapterComments

func (q *Queries) GetTotalBookGroupAndChapterComments(ctx context.Context, arg GetTotalBookGroupAndChapterCommentsParams) (int64, error)

func (*Queries) GetTotalBookGroupComments

func (q *Queries) GetTotalBookGroupComments(ctx context.Context, bookGroupID int32) (int64, error)

func (*Queries) GetUserInfo

func (q *Queries) GetUserInfo(ctx context.Context, id int32) (GetUserInfoRow, error)

func (*Queries) GetUserPermission

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

func (*Queries) GetViewByMonth

func (q *Queries) GetViewByMonth(ctx context.Context, bookChapterID int32) (interface{}, error)

func (*Queries) GetViewByWeek

func (q *Queries) GetViewByWeek(ctx context.Context, bookChapterID int32) (interface{}, error)

func (*Queries) GetViewByYear

func (q *Queries) GetViewByYear(ctx context.Context, bookChapterID int32) (interface{}, error)

func (*Queries) ImagesByBookChapter

func (q *Queries) ImagesByBookChapter(ctx context.Context, bookChapterID int32) ([]ImagesByBookChapterRow, error)

func (*Queries) InsertBookAuthor

func (q *Queries) InsertBookAuthor(ctx context.Context, arg InsertBookAuthorParams) (BookAuthor, error)

func (*Queries) InsertBookChapter

func (q *Queries) InsertBookChapter(ctx context.Context, arg InsertBookChapterParams) (BookChapter, error)

func (*Queries) InsertBookChapterImage

func (q *Queries) InsertBookChapterImage(ctx context.Context, arg InsertBookChapterImageParams) error

func (*Queries) InsertBookGroup

func (q *Queries) InsertBookGroup(ctx context.Context, arg InsertBookGroupParams) (InsertBookGroupRow, error)

func (*Queries) InsertBookGroupArt

func (q *Queries) InsertBookGroupArt(ctx context.Context, arg InsertBookGroupArtParams) (BookGroupArt, error)

func (*Queries) InsertBookGroupAuthor

func (q *Queries) InsertBookGroupAuthor(ctx context.Context, arg InsertBookGroupAuthorParams) (BookGroupAuthor, error)

func (*Queries) InsertBookGroupGenre

func (q *Queries) InsertBookGroupGenre(ctx context.Context, arg InsertBookGroupGenreParams) (BookGroupGenre, error)

func (*Queries) InsertGenre

func (q *Queries) InsertGenre(ctx context.Context, arg InsertGenreParams) (Genre, error)

func (*Queries) InsertImage

func (q *Queries) InsertImage(ctx context.Context, arg InsertImageParams) (int32, error)

func (*Queries) InsertNewRole

func (q *Queries) InsertNewRole(ctx context.Context, arg InsertNewRoleParams) (Role, error)

func (*Queries) InsertUser

func (q *Queries) InsertUser(ctx context.Context, arg InsertUserParams) (User, error)

func (*Queries) LatestBookGroups

func (q *Queries) LatestBookGroups(ctx context.Context, arg LatestBookGroupsParams) ([]LatestBookGroupsRow, error)

func (*Queries) Likes

func (q *Queries) Likes(ctx context.Context, arg LikesParams) error

func (*Queries) ListBookGroups

func (q *Queries) ListBookGroups(ctx context.Context, limit int32) ([]BookGroup, error)

func (*Queries) NumberBookGroup

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

func (*Queries) NumberBookGroupSearchResult

func (q *Queries) NumberBookGroupSearchResult(ctx context.Context, query string) (int64, error)

func (*Queries) NumberRowBookGroupInGenre

func (q *Queries) NumberRowBookGroupInGenre(ctx context.Context, genreID int32) (int64, error)

func (*Queries) RandomBookGroups

func (q *Queries) RandomBookGroups(ctx context.Context, limit int32) ([]RandomBookGroupsRow, error)

func (*Queries) Role

func (q *Queries) Role(ctx context.Context, id int32) (RoleRow, error)

func (*Queries) SearchAuthors

func (q *Queries) SearchAuthors(ctx context.Context, unaccent string) ([]SearchAuthorsRow, error)

func (*Queries) SearchResult

func (q *Queries) SearchResult(ctx context.Context, arg SearchResultParams) ([]SearchResultRow, error)

func (*Queries) SearchSuggestion

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

func (*Queries) SearchUsers

func (q *Queries) SearchUsers(ctx context.Context, dollar_1 sql.NullString) ([]SearchUsersRow, error)

func (*Queries) SetRole

func (q *Queries) SetRole(ctx context.Context, arg SetRoleParams) error

func (*Queries) Unlikes

func (q *Queries) Unlikes(ctx context.Context, arg UnlikesParams) error

func (*Queries) UpdateBookAuthor

func (q *Queries) UpdateBookAuthor(ctx context.Context, arg UpdateBookAuthorParams) error

func (*Queries) UpdateBookChapter

func (q *Queries) UpdateBookChapter(ctx context.Context, arg UpdateBookChapterParams) error

func (*Queries) UpdateBookGroup

func (q *Queries) UpdateBookGroup(ctx context.Context, arg UpdateBookGroupParams) error

func (*Queries) UpdateComment

func (q *Queries) UpdateComment(ctx context.Context, arg UpdateCommentParams) error

func (*Queries) UpdateGenre

func (q *Queries) UpdateGenre(ctx context.Context, arg UpdateGenreParams) error

func (*Queries) UpdatePassword

func (q *Queries) UpdatePassword(ctx context.Context, arg UpdatePasswordParams) error

func (*Queries) UpdateUserInfo

func (q *Queries) UpdateUserInfo(ctx context.Context, arg UpdateUserInfoParams) error

func (*Queries) UpsertViewByDate

func (q *Queries) UpsertViewByDate(ctx context.Context, bookChapterID int32) error

func (*Queries) UserByEmail

func (q *Queries) UserByEmail(ctx context.Context, email string) (User, error)

func (*Queries) UserByUsernameOrEmail

func (q *Queries) UserByUsernameOrEmail(ctx context.Context, userName sql.NullString) (User, error)

func (*Queries) WithTx

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

type RandomBookGroupsRow

type RandomBookGroupsRow struct {
	ID            int32       `json:"id"`
	Image         interface{} `json:"image"`
	Title         string      `json:"title"`
	LatestChapter interface{} `json:"latestChapter"`
	LastUpdated   interface{} `json:"lastUpdated"`
	Views         interface{} `json:"views"`
	Comments      int64       `json:"comments"`
	Likes         interface{} `json:"likes"`
}

type Role

type Role struct {
	ID          int32          `json:"id"`
	Name        string         `json:"name"`
	Description sql.NullString `json:"description"`
}

type RolePermission

type RolePermission struct {
	Module string `json:"module"`
	Action string `json:"action"`
	RoleID int32  `json:"roleID"`
}

type RoleRow

type RoleRow struct {
	RoleName        string   `json:"roleName"`
	RolePermissions []string `json:"rolePermissions"`
}

type SearchAuthorsRow

type SearchAuthorsRow struct {
	Name    string         `json:"name"`
	ID      int32          `json:"id"`
	Aliases sql.NullString `json:"aliases"`
	Path    sql.NullString `json:"path"`
}

type SearchResultParams

type SearchResultParams struct {
	Offset int32  `json:"offset"`
	Limit  int32  `json:"limit"`
	Query  string `json:"query"`
}

type SearchResultRow

type SearchResultRow struct {
	ID            int32       `json:"id"`
	Image         interface{} `json:"image"`
	Title         string      `json:"title"`
	LatestChapter interface{} `json:"latestChapter"`
	LastUpdated   interface{} `json:"lastUpdated"`
	Views         interface{} `json:"views"`
	Comments      int64       `json:"comments"`
	Likes         interface{} `json:"likes"`
}

type SearchSuggestionRow

type SearchSuggestionRow struct {
	Title         string      `json:"title"`
	ID            int32       `json:"id"`
	Image         interface{} `json:"image"`
	LatestChapter interface{} `json:"latestChapter"`
}

type SearchUsersRow

type SearchUsersRow struct {
	UserName sql.NullString `json:"userName"`
	ID       int32          `json:"id"`
	Path     sql.NullString `json:"path"`
}

type SetRoleParams

type SetRoleParams struct {
	ID     int32 `json:"id"`
	RoleID int32 `json:"roleID"`
}

type TempImage

type TempImage struct {
	ImageID     int32     `json:"imageID"`
	DateCreated time.Time `json:"dateCreated"`
}

type UnlikesParams

type UnlikesParams struct {
	UserID      int32 `json:"userID"`
	BookGroupID int32 `json:"bookGroupID"`
}

type UpdateBookAuthorParams

type UpdateBookAuthorParams struct {
	ID            int32          `json:"id"`
	Name          string         `json:"name"`
	Description   sql.NullString `json:"description"`
	AvatarImageID sql.NullInt32  `json:"avatarImageID"`
	Aliases       sql.NullString `json:"aliases"`
}

type UpdateBookChapterParams

type UpdateBookChapterParams struct {
	ID            int32          `json:"id"`
	ChapterNumber float64        `json:"chapterNumber"`
	Name          sql.NullString `json:"name"`
	TextContent   sql.NullString `json:"textContent"`
}

type UpdateBookGroupParams

type UpdateBookGroupParams struct {
	ID                int32          `json:"id"`
	Title             string         `json:"title"`
	Description       sql.NullString `json:"description"`
	PrimaryCoverArtID sql.NullInt32  `json:"primaryCoverArtID"`
	Aliases           sql.NullString `json:"aliases"`
}

type UpdateCommentParams

type UpdateCommentParams struct {
	ID      int32  `json:"id"`
	Content string `json:"content"`
}

type UpdateGenreParams

type UpdateGenreParams struct {
	ID          int32          `json:"id"`
	Name        string         `json:"name"`
	Description sql.NullString `json:"description"`
	ImageID     sql.NullInt32  `json:"imageID"`
}

type UpdatePasswordParams

type UpdatePasswordParams struct {
	ID       int32          `json:"id"`
	Password sql.NullString `json:"password"`
}

type UpdateUserInfoParams

type UpdateUserInfoParams struct {
	ID            int32          `json:"id"`
	Email         string         `json:"email"`
	UserName      sql.NullString `json:"userName"`
	Summary       sql.NullString `json:"summary"`
	AvatarImageID sql.NullInt32  `json:"avatarImageID"`
}

type User

type User struct {
	ID            int32          `json:"id"`
	DateCreated   time.Time      `json:"dateCreated"`
	UserName      sql.NullString `json:"userName"`
	Password      sql.NullString `json:"password"`
	Email         string         `json:"email"`
	Summary       sql.NullString `json:"summary"`
	AvatarImageID sql.NullInt32  `json:"avatarImageID"`
	RoleID        int32          `json:"roleID"`
	FavoriteList  sql.NullString `json:"favoriteList"`
}

Jump to

Keyboard shortcuts

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