dblist

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JobMakeDriverParams added in v0.24.0

func JobMakeDriverParams(ctx context.Context, params *JobListParams, sqlFragmentColumnIn func(column string, values any) (string, any, error)) (*riverdriver.JobListParams, error)

JobMakeDriverParams converts client-level parameters for job and delete to driver-level parameters for use with an executor, which generally goes by converting typed fields for IDs, kinds, queues, etc. to lower-level SQL.

This was originally implemented for listing jobs, but since the logic is so similar, it also performs the same function for JobDeleteMany. This works because `riverdriver.JobListParams` is identical to `JobDeleteMany` and therefore pointer-level converts to it.

Types

type JobListOrderBy

type JobListOrderBy struct {
	Expr  string
	Order SortOrder
}

type JobListParams

type JobListParams struct {
	IDs        []int64
	Kinds      []string
	LimitCount int32
	OrderBy    []JobListOrderBy
	Priorities []int16
	Queues     []string
	Schema     string
	States     []rivertype.JobState
	Where      []WherePredicate
}

type SortOrder

type SortOrder int
const (
	SortOrderUnspecified SortOrder = iota
	SortOrderAsc
	SortOrderDesc
)

type WherePredicate added in v0.23.0

type WherePredicate struct {
	NamedArgs map[string]any
	SQL       string
}

Jump to

Keyboard shortcuts

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