dbsqlc

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2025 License: MPL-2.0 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 IndexesExistInCurrentSchemaRow added in v0.9.0

type IndexesExistInCurrentSchemaRow struct {
	IndexNamesIndexName string
	Exists              bool
}

type JobCountByQueueAndStateRow

type JobCountByQueueAndStateRow struct {
	Queue          string
	CountAvailable int64
	CountRunning   int64
}

type JobCountByStateRow

type JobCountByStateRow struct {
	State RiverJobState
	Count int64
}

type JobKindListByPrefixParams added in v0.10.0

type JobKindListByPrefixParams struct {
	Prefix  interface{}
	After   interface{}
	Exclude []string
	Max     int32
}

type JobListWorkflowParams

type JobListWorkflowParams struct {
	WorkflowID       string
	PaginationOffset int64
	PaginationLimit  int32
}

type NullRiverJobState

type NullRiverJobState struct {
	RiverJobState RiverJobState
	Valid         bool // Valid is true if RiverJobState is not NULL
}

func (*NullRiverJobState) Scan

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

Scan implements the Scanner interface.

func (NullRiverJobState) Value

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

Value implements the driver Valuer interface.

type ProducerListByQueueRow added in v0.9.0

type ProducerListByQueueRow struct {
	RiverProducer RiverProducer
	Running       int32
}

type Queries

type Queries struct {
}

func New

func New() *Queries

func (*Queries) IndexExistsInCurrentSchema added in v0.9.0

func (q *Queries) IndexExistsInCurrentSchema(ctx context.Context, db DBTX, indexName string) (bool, error)

func (*Queries) IndexesExistInCurrentSchema added in v0.9.0

func (q *Queries) IndexesExistInCurrentSchema(ctx context.Context, db DBTX, indexNames []string) ([]*IndexesExistInCurrentSchemaRow, error)

func (*Queries) JobCountByQueueAndState

func (q *Queries) JobCountByQueueAndState(ctx context.Context, db DBTX, queueNames []string) ([]*JobCountByQueueAndStateRow, error)

func (*Queries) JobCountByState

func (q *Queries) JobCountByState(ctx context.Context, db DBTX) ([]*JobCountByStateRow, error)

func (*Queries) JobKindListByPrefix added in v0.10.0

func (q *Queries) JobKindListByPrefix(ctx context.Context, db DBTX, arg *JobKindListByPrefixParams) ([]string, error)

func (*Queries) JobListWorkflow

func (q *Queries) JobListWorkflow(ctx context.Context, db DBTX, arg *JobListWorkflowParams) ([]*RiverJob, error)

func (*Queries) ProducerListByQueue added in v0.9.0

func (q *Queries) ProducerListByQueue(ctx context.Context, db DBTX, queueName string) ([]*ProducerListByQueueRow, error)

func (*Queries) QueueNameListByPrefix added in v0.10.0

func (q *Queries) QueueNameListByPrefix(ctx context.Context, db DBTX, arg *QueueNameListByPrefixParams) ([]string, error)

func (*Queries) TableExistsInCurrentSchema added in v0.9.0

func (q *Queries) TableExistsInCurrentSchema(ctx context.Context, db DBTX, tableName string) (bool, error)

func (*Queries) WorkflowListActive

func (q *Queries) WorkflowListActive(ctx context.Context, db DBTX, arg *WorkflowListActiveParams) ([]*WorkflowListActiveRow, error)

func (*Queries) WorkflowListAll

func (q *Queries) WorkflowListAll(ctx context.Context, db DBTX, arg *WorkflowListAllParams) ([]*WorkflowListAllRow, error)

func (*Queries) WorkflowListInactive

func (q *Queries) WorkflowListInactive(ctx context.Context, db DBTX, arg *WorkflowListInactiveParams) ([]*WorkflowListInactiveRow, error)

type QueueNameListByPrefixParams added in v0.10.0

type QueueNameListByPrefixParams struct {
	After   string
	Prefix  string
	Exclude []string
	Max     int32
}

type RiverClient added in v0.9.0

type RiverClient struct {
	ID        string
	CreatedAt pgtype.Timestamptz
	Metadata  []byte
	PausedAt  pgtype.Timestamptz
	UpdatedAt pgtype.Timestamptz
}

type RiverClientQueue added in v0.9.0

type RiverClientQueue struct {
	RiverClientID    string
	Name             string
	CreatedAt        pgtype.Timestamptz
	MaxWorkers       int64
	Metadata         []byte
	NumJobsCompleted int64
	NumJobsRunning   int64
	UpdatedAt        pgtype.Timestamptz
}

type RiverJob

type RiverJob struct {
	ID           int64
	Args         []byte
	Attempt      int16
	AttemptedAt  pgtype.Timestamptz
	AttemptedBy  []string
	CreatedAt    pgtype.Timestamptz
	Errors       [][]byte
	FinalizedAt  pgtype.Timestamptz
	Kind         string
	MaxAttempts  int16
	Metadata     []byte
	Priority     int16
	Queue        string
	State        RiverJobState
	ScheduledAt  pgtype.Timestamptz
	Tags         []string
	UniqueKey    []byte
	UniqueStates pgtype.Bits
}

type RiverJobState

type RiverJobState string
const (
	RiverJobStateAvailable RiverJobState = "available"
	RiverJobStateCancelled RiverJobState = "cancelled"
	RiverJobStateCompleted RiverJobState = "completed"
	RiverJobStateDiscarded RiverJobState = "discarded"
	RiverJobStatePending   RiverJobState = "pending"
	RiverJobStateRetryable RiverJobState = "retryable"
	RiverJobStateRunning   RiverJobState = "running"
	RiverJobStateScheduled RiverJobState = "scheduled"
)

func (*RiverJobState) Scan

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

type RiverLeader

type RiverLeader struct {
	ElectedAt pgtype.Timestamptz
	ExpiresAt pgtype.Timestamptz
	LeaderID  string
	Name      string
}

type RiverMigration added in v0.9.0

type RiverMigration struct {
	Line      string
	Version   int64
	CreatedAt pgtype.Timestamptz
}

type RiverProducer added in v0.9.0

type RiverProducer struct {
	ID         int64
	ClientID   string
	QueueName  string
	MaxWorkers int32
	Metadata   []byte
	PausedAt   pgtype.Timestamptz
	CreatedAt  pgtype.Timestamptz
	UpdatedAt  pgtype.Timestamptz
}

type RiverQueue

type RiverQueue struct {
	Name      string
	CreatedAt pgtype.Timestamptz
	Metadata  []byte
	PausedAt  pgtype.Timestamptz
	UpdatedAt pgtype.Timestamptz
}

type WorkflowListActiveParams

type WorkflowListActiveParams struct {
	After           string
	PaginationLimit int32
}

type WorkflowListActiveRow

type WorkflowListActiveRow struct {
	WorkflowID        string
	WorkflowName      string
	EarliestCreatedAt pgtype.Timestamptz
	CountFailedDeps   int64
	CountAvailable    int64
	CountCancelled    int64
	CountCompleted    int64
	CountDiscarded    int64
	CountPending      int64
	CountRetryable    int64
	CountRunning      int64
	CountScheduled    int64
}

type WorkflowListAllParams

type WorkflowListAllParams struct {
	After           string
	PaginationLimit int32
}

type WorkflowListAllRow

type WorkflowListAllRow struct {
	WorkflowID        string
	WorkflowName      string
	EarliestCreatedAt pgtype.Timestamptz
	CountFailedDeps   int64
	CountAvailable    int64
	CountCancelled    int64
	CountCompleted    int64
	CountDiscarded    int64
	CountPending      int64
	CountRetryable    int64
	CountRunning      int64
	CountScheduled    int64
}

type WorkflowListInactiveParams

type WorkflowListInactiveParams struct {
	PaginationLimit int32
	After           string
}

type WorkflowListInactiveRow

type WorkflowListInactiveRow struct {
	WorkflowID        string
	WorkflowName      string
	EarliestCreatedAt pgtype.Timestamptz
	CountFailedDeps   int64
	CountAvailable    int64
	CountCancelled    int64
	CountCompleted    int64
	CountDiscarded    int64
	CountPending      int64
	CountRetryable    int64
	CountRunning      int64
	CountScheduled    int64
}

Source Files

  • db.go
  • models.go
  • pg_misc.sql.go
  • query.sql.go
  • river_job.sql.go
  • river_producer.sql.go
  • river_queue.sql.go
  • workflow.sql.go

Jump to

Keyboard shortcuts

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