sqlc

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcquireMessagesByTopicParams

type AcquireMessagesByTopicParams struct {
	Topic string      `json:"topic"`
	Limit pgtype.Int4 `json:"limit"`
}

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
	CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
}

type DeleteMessagesByIdsParams

type DeleteMessagesByIdsParams struct {
	Topic string  `json:"topic"`
	Ids   []int64 `json:"ids"`
}

type InsertMessageParams

type InsertMessageParams struct {
	Topic   string `json:"topic"`
	Payload []byte `json:"payload"`
}

type Message

type Message struct {
	ID         int64              `json:"id"`
	InsertedAt pgtype.Timestamptz `json:"inserted_at"`
	Topic      string             `json:"topic"`
	Payload    []byte             `json:"payload"`
}

type Queries

type Queries struct {
}

func New

func New() *Queries

func (*Queries) AcquireMessagesByTopic

func (q *Queries) AcquireMessagesByTopic(ctx context.Context, db DBTX, arg AcquireMessagesByTopicParams) ([]*Message, error)

func (*Queries) DeleteMessagesByIds

func (q *Queries) DeleteMessagesByIds(ctx context.Context, db DBTX, arg DeleteMessagesByIdsParams) error

func (*Queries) InsertMessage

func (q *Queries) InsertMessage(ctx context.Context, db DBTX, arg []InsertMessageParams) (int64, error)

Jump to

Keyboard shortcuts

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