Documentation
¶
Overview ¶
Package riveruidriver defines the database operations that River UI adds on top of River's core driver. Database-specific implementations keep SQL dialect details out of HTTP endpoints while continuing to use the executor already owned by the caller's River client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver interface {
GetExecutor(riverExecutor riverdriver.Executor) Executor
}
Driver decorates a River executor with queries used only by River UI.
type Executor ¶
type Executor interface {
riverdriver.Executor
// JobCountByAllStatesCapped returns an exact count through Max and Max+1 as
// a sentinel when additional rows exist.
JobCountByAllStatesCapped(ctx context.Context, params *JobCountByAllStatesCappedParams) (map[rivertype.JobState]int, error)
// JobCountEstimate returns inexpensive database estimates where supported.
// Drivers without an estimate strategy return an empty map.
JobCountEstimate(ctx context.Context, params *JobCountEstimateParams) (map[rivertype.JobState]JobCountEstimateResult, error)
}
Executor contains River UI's database operations and embeds River's executor so callers retain transaction and core query support through one value.
type JobCountByAllStatesCappedParams ¶
type JobCountEstimateParams ¶
Source Files
¶
- river_ui_driver_interface.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package riveruidrivertest provides a shared conformance suite for River UI database drivers.
|
Package riveruidrivertest provides a shared conformance suite for River UI database drivers. |
|
Package riveruipostgres implements River UI's database operations for PostgreSQL.
|
Package riveruipostgres implements River UI's database operations for PostgreSQL. |
|
Package riveruisqlite implements River UI's database operations for SQLite.
|
Package riveruisqlite implements River UI's database operations for SQLite. |
Click to show internal directories.
Click to hide internal directories.