Skip to content

Commit

Permalink
lint: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
friendlymatthew committed May 29, 2024
1 parent f066c1a commit 7609966
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/btree/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { FieldType } from "../db/database";
import { FileFormat } from "../file/meta";
import { RangeResolver } from "../resolver/resolver";
import { decodeUvarint } from "../util/uvarint";
import {ReferencedValue} from "./btree";
import { ReferencedValue } from "./btree";

export const pageSizeBytes = 4096;

Expand Down Expand Up @@ -70,23 +70,23 @@ export class BTreeNode {
const childPointer = this.pointer(index);

this.childrenCache[index] = BTreeNode.fromMemoryPointer(
childPointer,
this.tree,
this.dataFileResolver,
this.fileFormat,
this.pageFieldType,
this.pageFieldWidth,
childPointer,
this.tree,
this.dataFileResolver,
this.fileFormat,
this.pageFieldType,
this.pageFieldWidth,
).then(({ node, bytesRead }) => {
if (!bytesRead) {
throw new Error("bytes read do not line up")
throw new Error("bytes read do not line up");
}

return node;
});
}

if (!this.childrenCache[index]) {
throw new Error(`children cache at ${index} is null`)
throw new Error(`children cache at ${index} is null`);
}

return await this.childrenCache[index]!!;
Expand Down

0 comments on commit 7609966

Please sign in to comment.