sqlc

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

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRevisionParams

type CreateRevisionParams struct {
	ID           string
	ReviseItemID string
	RevisedAt    time.Time
}

type CreateUserParams

type CreateUserParams struct {
	ID           string
	ChatID       int64
	CreatedAt    time.Time
	UpdatedAt    time.Time
	Language     sql.NullString
	ReminderTime string
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type GetUserReviseItemsByTimeParams

type GetUserReviseItemsByTimeParams struct {
	UserID         string
	NextRevisionAt time.Time
}

type ListUserReviseItemsParams

type ListUserReviseItemsParams struct {
	UserID string
	Limit  int64
	Offset int64
}

type ListUserReviseItemsRow

type ListUserReviseItemsRow struct {
	Count          int64
	ID             string
	UserID         string
	Name           string
	Description    sql.NullString
	Tags           sql.NullString
	CreatedAt      time.Time
	UpdatedAt      time.Time
	DeletedAt      sql.NullTime
	LastRevisedAt  time.Time
	NextRevisionAt time.Time
}

type MarkReviseItemDeletedParams

type MarkReviseItemDeletedParams struct {
	DeletedAt sql.NullTime
	ID        string
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateRevision

func (q *Queries) CreateRevision(ctx context.Context, arg CreateRevisionParams) error

func (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) error

func (*Queries) DeleteReviseItem

func (q *Queries) DeleteReviseItem(ctx context.Context, id string) error

func (*Queries) DeleteReviseItemRevisions

func (q *Queries) DeleteReviseItemRevisions(ctx context.Context, reviseItemID string) error

func (*Queries) DeleteRevision

func (q *Queries) DeleteRevision(ctx context.Context, id string) error

func (*Queries) GetReviseItem

func (q *Queries) GetReviseItem(ctx context.Context, id string) (ReviseItem, error)

func (*Queries) GetRevision

func (q *Queries) GetRevision(ctx context.Context, id string) (Revision, error)

func (*Queries) GetRevisionItemRevisions

func (q *Queries) GetRevisionItemRevisions(ctx context.Context, reviseItemID string) ([]Revision, error)

func (*Queries) GetUserByChatID

func (q *Queries) GetUserByChatID(ctx context.Context, chatID int64) (User, error)

func (*Queries) GetUserByID

func (q *Queries) GetUserByID(ctx context.Context, id string) (User, error)

func (*Queries) GetUserReviseItems

func (q *Queries) GetUserReviseItems(ctx context.Context, userID string) ([]ReviseItem, error)

func (*Queries) GetUserReviseItemsByTime

func (q *Queries) GetUserReviseItemsByTime(ctx context.Context, arg GetUserReviseItemsByTimeParams) ([]ReviseItem, error)

func (*Queries) GetUsersByReminderTime

func (q *Queries) GetUsersByReminderTime(ctx context.Context, reminderTime string) ([]User, error)

func (*Queries) ListUserReviseItems

func (q *Queries) ListUserReviseItems(ctx context.Context, arg ListUserReviseItemsParams) ([]ListUserReviseItemsRow, error)

func (*Queries) MarkReviseItemDeleted

func (q *Queries) MarkReviseItemDeleted(ctx context.Context, arg MarkReviseItemDeletedParams) error

func (*Queries) SaveReviseItem

func (q *Queries) SaveReviseItem(ctx context.Context, arg SaveReviseItemParams) error

func (*Queries) UpdateReviseItem

func (q *Queries) UpdateReviseItem(ctx context.Context, arg UpdateReviseItemParams) error

func (*Queries) UpdateUser

func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) error

func (*Queries) WithTx

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

type ReviseItem

type ReviseItem struct {
	ID             string
	UserID         string
	Name           string
	Description    sql.NullString
	Tags           sql.NullString
	CreatedAt      time.Time
	UpdatedAt      time.Time
	DeletedAt      sql.NullTime
	LastRevisedAt  time.Time
	NextRevisionAt time.Time
}

type Revision

type Revision struct {
	ID           string
	ReviseItemID string
	RevisedAt    time.Time
}

type SaveReviseItemParams

type SaveReviseItemParams struct {
	ID             string
	UserID         string
	Name           string
	Description    sql.NullString
	Tags           sql.NullString
	CreatedAt      time.Time
	UpdatedAt      time.Time
	LastRevisedAt  time.Time
	NextRevisionAt time.Time
}

type UpdateReviseItemParams

type UpdateReviseItemParams struct {
	Name           string
	Description    sql.NullString
	Tags           sql.NullString
	CreatedAt      time.Time
	UpdatedAt      time.Time
	LastRevisedAt  time.Time
	NextRevisionAt time.Time
	ID             string
}

type UpdateUserParams

type UpdateUserParams struct {
	UpdatedAt    time.Time
	Language     sql.NullString
	ReminderTime string
	ID           string
}

type User

type User struct {
	ID           string
	ChatID       int64
	CreatedAt    time.Time
	UpdatedAt    time.Time
	Language     sql.NullString
	ReminderTime string
}

Jump to

Keyboard shortcuts

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