feat(page): add typed keyset pagination for Bob (#15)
Add transport-neutral keyset pagination through native Bob query mods. Preserve supported cursor value types in a compact versioned format, with bidirectional pages, explicit row keys, and a separate opt-in count. Include SQLite tests, PostgreSQL service CI, and the cursor-format ADR. Closes #6
This commit was merged in pull request #15.
This commit is contained in:
1 parent
e5298cff37
commit
c45e8abe08
11 files changed
+1225
-1
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# corestack go
|
||||
|
||||
Shared Go building blocks. Includes `docs`, a checker for architecture decision records (ADRs) and implementation plans, and `lifecycle`, a service and worker coordinator.
|
||||
Shared Go building blocks. Includes `docs`, a checker for architecture decision records (ADRs) and implementation plans; `page`, Bob keyset pagination; and `lifecycle`, a service and worker coordinator.
|
||||
|
||||
## docs
|
||||
|
||||
@@ -20,6 +20,19 @@ docs check [--root DIR] # prints path:line: messa
|
||||
|
||||
The format is specified in [docs/docs-format.md](docs/docs-format.md); that document is the complete rule set. Exit status is `0` when every record is valid, `1` when problems are reported and `2` for usage errors.
|
||||
|
||||
## page
|
||||
|
||||
[`page`](page/page.go) provides transport-neutral Bob keyset pagination with typed
|
||||
items, mixed-direction sorts, opaque typed cursors, and a separate opt-in count.
|
||||
Pass a trusted Sort and a typed row key in the same column order; sort columns
|
||||
must be non-null and end in a unique column. See the [runnable example](page/example_test.go)
|
||||
and [cursor decision](docs/adr/20261027T184351001Z-preserve-typed-sort-values-in-versioned-page-cursors.md).
|
||||
|
||||
SQLite runs in-process in the normal test suite (requires CGO). PostgreSQL runs in
|
||||
CI; locally set `PAGE_POSTGRES_DSN` to an isolated test database to run the same
|
||||
flow. Set `PAGE_REQUIRE_POSTGRES=1` to fail rather than skip when the DSN is absent.
|
||||
MySQL mod composition compiles; its runtime behavior has not been verified.
|
||||
|
||||
## lifecycle
|
||||
|
||||
`go.auvem.com/corestack/lifecycle` sets up modules in registration order, runs
|
||||
|
||||
Reference in new issue
Block a user