@@ -15,7 +15,7 @@ import type { RandomDep } from "../Random.js";
1515import type { Result } from "../Result.js" ;
1616import { err , ok } from "../Result.js" ;
1717import type { SqliteDep } from "../Sqlite.js" ;
18- import { sql , SqliteValue } from "../Sqlite.js" ;
18+ import { SqliteValue , sql } from "../Sqlite.js" ;
1919import type { Task } from "../Task.js" ;
2020import { Millis } from "../Time.js" ;
2121import type { InferType , Int64String , Typed , TypeError } from "../Type.js" ;
@@ -31,14 +31,19 @@ import {
3131 String ,
3232} from "../Type.js" ;
3333import type { Awaitable } from "../Types.js" ;
34- import type { Owner , OwnerError , OwnerIdBytes } from "./Owner.js" ;
35- import { OwnerId , OwnerWriteKey } from "./Owner.js" ;
34+ import type {
35+ Owner ,
36+ OwnerError ,
37+ OwnerId ,
38+ OwnerIdBytes ,
39+ OwnerWriteKey ,
40+ } from "./Owner.js" ;
3641import { systemColumnsWithId } from "./Schema.js" ;
3742import {
3843 createTimestamp ,
3944 orderTimestampBytes ,
40- Timestamp ,
41- TimestampBytes ,
45+ type Timestamp ,
46+ type TimestampBytes ,
4247} from "./Timestamp.js" ;
4348
4449export interface StorageConfig {
@@ -1490,14 +1495,19 @@ const fingerprintRanges =
14901495 ` ) ;
14911496
14921497 const fingerprintRanges = result . rows . map (
1493- ( row , i , arr ) : FingerprintRange => ( {
1494- type : RangeType . Fingerprint ,
1495- upperBound : i === arr . length - 1 ? upperBound : row . b ! ,
1496- fingerprint : sqliteFingerprintToFingerprint ( [
1497- row . h1 ,
1498- row . h2 ,
1499- ] as SqliteFingerprint ) ,
1500- } ) ,
1498+ ( row , i , arr ) : FingerprintRange => {
1499+ const nextUpperBound = i === arr . length - 1 ? upperBound : row . b ;
1500+ assert ( nextUpperBound , "Expected fingerprint upper bound." ) ;
1501+
1502+ return {
1503+ type : RangeType . Fingerprint ,
1504+ upperBound : nextUpperBound ,
1505+ fingerprint : sqliteFingerprintToFingerprint ( [
1506+ row . h1 ,
1507+ row . h2 ,
1508+ ] as SqliteFingerprint ) ,
1509+ } ;
1510+ } ,
15011511 ) ;
15021512
15031513 return fingerprintRanges ;
0 commit comments