sqlc

package
v0.0.0-...-e57ca99 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 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 Feed

type Feed struct {
	FeedID        string
	Url           string
	TitleOriginal string
	Description   *string
	RegisteredAt  time.Time
	LastFetchedAt *time.Time
	CreatedAt     time.Time
	UpdatedAt     time.Time
	TitleEditted  *string
	Idx           int32
	Tags          []string
}

type FeedFetch

type FeedFetch struct {
	FeedFetchID string
	FeedID      string
	Status      FeedFetchStatus
	Message     *string
	FetchedAt   time.Time
	CreatedAt   time.Time
}

type FeedFetchStatus

type FeedFetchStatus string
const (
	FeedFetchStatusSuccess FeedFetchStatus = "Success"
	FeedFetchStatusFailure FeedFetchStatus = "Failure"
)

func (*FeedFetchStatus) Scan

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

type InsertFeedFetchParams

type InsertFeedFetchParams struct {
	FeedFetchID string
	FeedID      string
	Status      FeedFetchStatus
	Message     *string
	FetchedAt   time.Time
}

type InsertFeedParams

type InsertFeedParams struct {
	FeedID        string
	Url           string
	TitleOriginal string
	Description   *string
	RegisteredAt  time.Time
}

type InsertPostFavoriteParams

type InsertPostFavoriteParams struct {
	PostFavoriteID string
	PostID         string
	AddedAt        time.Time
}

type InsertPostFetchParams

type InsertPostFetchParams struct {
	PostFetchID string
	PostID      string
	Status      PostFetchStatus
	Message     *string
	FetchedAt   time.Time
}

type InsertPostParams

type InsertPostParams struct {
	PostID      string
	FeedID      string
	Title       string
	Description *string
	Author      *string
	Url         string
	PostedAt    *time.Time
	Status      PostStatus
}

type InsertPostSummaryParams

type InsertPostSummaryParams struct {
	PostSummaryID   string
	PostID          string
	SummarizeMethod string
	Summary         string
	SummarizedAt    time.Time
}

type NullFeedFetchStatus

type NullFeedFetchStatus struct {
	FeedFetchStatus FeedFetchStatus
	Valid           bool // Valid is true if FeedFetchStatus is not NULL
}

func (*NullFeedFetchStatus) Scan

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

Scan implements the Scanner interface.

func (NullFeedFetchStatus) Value

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

Value implements the driver Valuer interface.

type NullPostFetchStatus

type NullPostFetchStatus struct {
	PostFetchStatus PostFetchStatus
	Valid           bool // Valid is true if PostFetchStatus is not NULL
}

func (*NullPostFetchStatus) Scan

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

Scan implements the Scanner interface.

func (NullPostFetchStatus) Value

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

Value implements the driver Valuer interface.

type NullPostStatus

type NullPostStatus struct {
	PostStatus PostStatus
	Valid      bool // Valid is true if PostStatus is not NULL
}

func (*NullPostStatus) Scan

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

Scan implements the Scanner interface.

func (NullPostStatus) Value

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

Value implements the driver Valuer interface.

type Post

type Post struct {
	PostID        string
	FeedID        string
	Url           string
	Title         string
	Description   *string
	Author        *string
	Status        PostStatus
	PostedAt      *time.Time
	LastFetchedAt *time.Time
	CreatedAt     time.Time
	UpdatedAt     time.Time
}

type PostFavorite

type PostFavorite struct {
	PostFavoriteID string
	PostID         string
	AddedAt        time.Time
	CreatedAt      time.Time
}

type PostFetch

type PostFetch struct {
	PostFetchID string
	PostID      string
	Status      PostFetchStatus
	Message     *string
	FetchedAt   time.Time
	CreatedAt   time.Time
}

type PostFetchStatus

type PostFetchStatus string
const (
	PostFetchStatusSuccess PostFetchStatus = "Success"
	PostFetchStatusFailure PostFetchStatus = "Failure"
)

func (*PostFetchStatus) Scan

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

type PostStatus

type PostStatus string
const (
	PostStatusRegistered PostStatus = "Registered"
	PostStatusFetched    PostStatus = "Fetched"
	PostStatusSummarized PostStatus = "Summarized"
)

func (*PostStatus) Scan

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

type PostSummary

type PostSummary struct {
	PostSummaryID   string
	PostID          string
	SummarizeMethod string
	Summary         string
	SummarizedAt    time.Time
	CreatedAt       time.Time
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) DeleteFeed

func (q *Queries) DeleteFeed(ctx context.Context, feedID string) error

func (*Queries) DeleteOldNonFavoritePosts

func (q *Queries) DeleteOldNonFavoritePosts(ctx context.Context, thresholdDate time.Time) (int64, error)

func (*Queries) DeletePostFavorite

func (q *Queries) DeletePostFavorite(ctx context.Context, postFavoriteID string) error

func (*Queries) InsertFeed

func (q *Queries) InsertFeed(ctx context.Context, arg InsertFeedParams) error

func (*Queries) InsertFeedFetch

func (q *Queries) InsertFeedFetch(ctx context.Context, arg InsertFeedFetchParams) error

func (*Queries) InsertPost

func (q *Queries) InsertPost(ctx context.Context, arg InsertPostParams) error

func (*Queries) InsertPostFavorite

func (q *Queries) InsertPostFavorite(ctx context.Context, arg InsertPostFavoriteParams) error

func (*Queries) InsertPostFetch

func (q *Queries) InsertPostFetch(ctx context.Context, arg InsertPostFetchParams) error

func (*Queries) InsertPostSummary

func (q *Queries) InsertPostSummary(ctx context.Context, arg InsertPostSummaryParams) error

func (*Queries) SelectFeed

func (q *Queries) SelectFeed(ctx context.Context, feedID string) (Feed, error)

func (*Queries) SelectFeedForUpdate

func (q *Queries) SelectFeedForUpdate(ctx context.Context, feedID string) (Feed, error)

func (*Queries) SelectFeedMaxIdx

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

func (*Queries) SelectFeeds

func (q *Queries) SelectFeeds(ctx context.Context, feedIds []string) ([]Feed, error)

func (*Queries) SelectFeedsOrderByIdxAsc

func (q *Queries) SelectFeedsOrderByIdxAsc(ctx context.Context) ([]Feed, error)

func (*Queries) SelectPost

func (q *Queries) SelectPost(ctx context.Context, postID string) (Post, error)

func (*Queries) SelectPostFavorite

func (q *Queries) SelectPostFavorite(ctx context.Context, postFavoriteID string) (PostFavorite, error)

func (*Queries) SelectPostFavoritesByPostIDs

func (q *Queries) SelectPostFavoritesByPostIDs(ctx context.Context, postIds []string) ([]PostFavorite, error)

func (*Queries) SelectPostForUpdate

func (q *Queries) SelectPostForUpdate(ctx context.Context, postID string) (Post, error)

func (*Queries) SelectPostSummariesByPostIDs

func (q *Queries) SelectPostSummariesByPostIDs(ctx context.Context, postIds []string) ([]PostSummary, error)

func (*Queries) SelectPosts

func (q *Queries) SelectPosts(ctx context.Context, arg SelectPostsParams) ([]SelectPostsRow, error)

func (*Queries) SelectRecentlyNotFetchedFeeds

func (q *Queries) SelectRecentlyNotFetchedFeeds(ctx context.Context, lastFetchedAtThreshold time.Time) ([]Feed, error)

func (*Queries) UpdateFeedIdx

func (q *Queries) UpdateFeedIdx(ctx context.Context, arg UpdateFeedIdxParams) error

func (*Queries) UpdateFeedIdxesDecrement

func (q *Queries) UpdateFeedIdxesDecrement(ctx context.Context, arg UpdateFeedIdxesDecrementParams) error

func (*Queries) UpdateFeedIdxesIncrement

func (q *Queries) UpdateFeedIdxesIncrement(ctx context.Context, arg UpdateFeedIdxesIncrementParams) error

func (*Queries) UpdateFeedLastFetchedAt

func (q *Queries) UpdateFeedLastFetchedAt(ctx context.Context, arg UpdateFeedLastFetchedAtParams) error

func (*Queries) UpdateFeedTitle

func (q *Queries) UpdateFeedTitle(ctx context.Context, arg UpdateFeedTitleParams) error

func (*Queries) UpdatePost

func (q *Queries) UpdatePost(ctx context.Context, arg UpdatePostParams) error

func (*Queries) WithTx

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

type SelectPostsParams

type SelectPostsParams struct {
	FeedIds           []string
	OnlyHaveFavorites bool
	Ord               string
	Off               int32
	Lim               int32
}

type SelectPostsRow

type SelectPostsRow struct {
	TotalCount int64
	Post       Post
}

type UpdateFeedIdxParams

type UpdateFeedIdxParams struct {
	Idx    int32
	FeedID string
}

type UpdateFeedIdxesDecrementParams

type UpdateFeedIdxesDecrementParams struct {
	IdxFrom int32
	IdxTo   int32
}

type UpdateFeedIdxesIncrementParams

type UpdateFeedIdxesIncrementParams struct {
	IdxFrom int32
	IdxTo   int32
}

type UpdateFeedLastFetchedAtParams

type UpdateFeedLastFetchedAtParams struct {
	LastFetchedAt time.Time
	FeedID        string
}

type UpdateFeedTitleParams

type UpdateFeedTitleParams struct {
	TitleEditted *string
	FeedID       string
}

type UpdatePostParams

type UpdatePostParams struct {
	Title         string
	Description   *string
	Author        *string
	Url           string
	PostedAt      *time.Time
	LastFetchedAt *time.Time
	Status        PostStatus
	PostID        string
}

Jump to

Keyboard shortcuts

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