River

riverprodatabasesql

package module
v0.15.3 Latest
Published: Jun 6, 2025 License: Proprietary

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	riverdatabasesql.Driver
	// contains filtered or unexported fields
}

Driver is an implementation of riverdriver.Driver for Pgx v5.

func New

func New(dbPool *sql.DB) *Driver

func (*Driver) GetExecutor

func (d *Driver) GetExecutor() riverdriver.Executor

func (*Driver) GetMigrationDefaultLines

func (d *Driver) GetMigrationDefaultLines() []string

func (*Driver) GetMigrationFS

func (d *Driver) GetMigrationFS(line string) fs.FS

func (*Driver) GetMigrationLines

func (d *Driver) GetMigrationLines() []string

func (*Driver) GetMigrationTruncateTables

func (d *Driver) GetMigrationTruncateTables(line string, version int) []string

func (*Driver) GetProExecutor

func (d *Driver) GetProExecutor() driver.ProExecutor

func (*Driver) HasPool

func (d *Driver) HasPool() bool

func (*Driver) PluginInit

func (d *Driver) PluginInit(archetype *baseservice.Archetype)

PluginInit initializes a plugin with an archetype It's invoked on Client.NewClient.

func (*Driver) PluginPilot

func (d *Driver) PluginPilot() riverpilot.Pilot

func (*Driver) ProConfigInit

func (d *Driver) ProConfigInit(pilot riverpilot.Pilot)

func (*Driver) UnwrapExecutor

func (d *Driver) UnwrapExecutor(tx *sql.Tx) riverdriver.ExecutorTx

func (*Driver) UnwrapProExecutor

func (d *Driver) UnwrapProExecutor(tx *sql.Tx) driver.ProExecutorTx

func (*Driver) UnwrapTx

func (d *Driver) UnwrapTx(execTx riverdriver.ExecutorTx) *sql.Tx

type Executor

type Executor struct {
	*riverdatabasesql.Executor
	// contains filtered or unexported fields
}

func (*Executor) Begin

func (*Executor) BeginPro

func (e *Executor) BeginPro(ctx context.Context) (driver.ProExecutorTx, error)

func (*Executor) GetPendingWorkflowIDs

func (e *Executor) GetPendingWorkflowIDs(ctx context.Context, params *driver.GetPendingWorkflowIDsParams) ([]*driver.GetPendingWorkflowIDsRow, error)

func (*Executor) JobGetAvailableLimited

func (e *Executor) JobGetAvailableLimited(ctx context.Context, params *driver.JobGetAvailableLimitedParams) ([]*rivertype.JobRow, error)

func (*Executor) JobGetAvailablePartitionKeys

func (e *Executor) JobGetAvailablePartitionKeys(ctx context.Context, params *driver.JobGetAvailablePartitionKeysParams) ([]string, error)

func (*Executor) JobGetByWorkflowIDAndTaskName

func (e *Executor) JobGetByWorkflowIDAndTaskName(ctx context.Context, params *driver.JobGetByWorkflowIDAndTaskNameParams) (*rivertype.JobRow, error)

func (*Executor) PGTryAdvisoryXactLock

func (e *Executor) PGTryAdvisoryXactLock(ctx context.Context, key int64) (bool, error)

func (*Executor) PeriodicJobGetAll

func (e *Executor) PeriodicJobGetAll(ctx context.Context, params *driver.PeriodicJobGetAllParams) ([]*driver.PeriodicJob, error)

func (*Executor) PeriodicJobGetByID

func (e *Executor) PeriodicJobGetByID(ctx context.Context, params *driver.PeriodicJobGetByIDParams) (*driver.PeriodicJob, error)

func (*Executor) PeriodicJobInsert

func (e *Executor) PeriodicJobInsert(ctx context.Context, params *driver.PeriodicJobInsertParams) (*driver.PeriodicJob, error)

func (*Executor) PeriodicJobKeepAliveAndReap

func (e *Executor) PeriodicJobKeepAliveAndReap(ctx context.Context, params *driver.PeriodicJobKeepAliveAndReapParams) ([]*driver.PeriodicJob, error)

func (*Executor) PeriodicJobUpsertMany

func (e *Executor) PeriodicJobUpsertMany(ctx context.Context, params *driver.PeriodicJobUpsertManyParams) ([]*driver.PeriodicJob, error)

func (*Executor) ProducerDelete

func (e *Executor) ProducerDelete(ctx context.Context, params *driver.ProducerDeleteParams) error

func (*Executor) ProducerGetByID

func (e *Executor) ProducerGetByID(ctx context.Context, params *driver.ProducerGetByIDParams) (*driver.Producer, error)

func (*Executor) ProducerInsertOrUpdate

func (e *Executor) ProducerInsertOrUpdate(ctx context.Context, params *driver.ProducerInsertOrUpdateParams) (*driver.Producer, error)

func (*Executor) ProducerKeepAlive

func (e *Executor) ProducerKeepAlive(ctx context.Context, params *driver.ProducerKeepAliveParams) (*driver.Producer, error)

func (*Executor) ProducerUpdate

func (e *Executor) ProducerUpdate(ctx context.Context, params *driver.ProducerUpdateParams) (*driver.Producer, error)

func (*Executor) QueueGetMetadataForInsert

func (*Executor) SequenceAppendMany

func (e *Executor) SequenceAppendMany(ctx context.Context, params *driver.SequenceAppendManyParams) (int, error)

func (*Executor) SequenceList

func (e *Executor) SequenceList(ctx context.Context, params *driver.SequenceListParams) ([]*driver.Sequence, error)

func (*Executor) SequencePromote

func (e *Executor) SequencePromote(ctx context.Context, params *driver.SequencePromoteParams) ([]string, error)

func (*Executor) SequencePromoteFromTable

func (*Executor) SequenceScanAndPromoteStalled

func (*Executor) StageWorkflowJobsMany

func (e *Executor) StageWorkflowJobsMany(ctx context.Context, params *driver.StageWorkflowJobsManyParams) ([]*rivertype.JobRow, error)

func (*Executor) WorkflowCancel

func (e *Executor) WorkflowCancel(ctx context.Context, params *driver.WorkflowCancelParams) ([]*rivertype.JobRow, error)

func (*Executor) WorkflowCancelWithFailedDepsMany

func (e *Executor) WorkflowCancelWithFailedDepsMany(ctx context.Context, params *driver.WorkflowCancelWithFailedDepsManyParams) ([]*rivertype.JobRow, error)

func (*Executor) WorkflowLoadTasksByNames

func (e *Executor) WorkflowLoadTasksByNames(ctx context.Context, params *driver.WorkflowLoadTasksByNamesParams) ([]*driver.WorkflowTask, error)

type ExecutorTx

type ExecutorTx struct {
	Executor
	// contains filtered or unexported fields
}

func (*ExecutorTx) Commit

func (t *ExecutorTx) Commit(ctx context.Context) error

func (*ExecutorTx) Rollback

func (t *ExecutorTx) Rollback(ctx context.Context) error