property Table.findByIdPrimary

Find a row by primary key, pinned to the primary (read-your-writes). Use when reading a row back immediately after committing its own write: a plain findById runs in "read" mode, which Turso may serve from a replica that lags behind the just-committed write and so miss the row (returning null). This reads on the primary, which always reflects the write.

Optional, like insertStatement/updateStatement: only the transactional CRUD-side-effect write path reads a row back this way, so a façade table that never takes that path may omit it.

Type

(id: InValue) => Promise<Row | null>

Usage

import { type Table } from "docs/database.ts";