Function: packRegionVersion()
Function: packRegionVersion()
Section titled “Function: packRegionVersion()”packRegionVersion(
region,localVersion):bigint
Defined in: core/src/protocol/causal-cookie.ts:85
Pack (region, localVersion) into a single monotonic bigint. Server-side SQL still uses row_version as a scalar within a region; the causal layer lives at the protocol boundary.
Layout: top 16 bits = region, low 48 bits = localVersion. Bigint math keeps callers safe for local versions > 2^53.
Parameters
Section titled “Parameters”region
Section titled “region”number
localVersion
Section titled “localVersion”bigint
Returns
Section titled “Returns”bigint