Skip to content

Commit

Permalink
Use maxWriteReplicationIndex in example
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Jastrzebski <[email protected]>
  • Loading branch information
haaawk committed Aug 14, 2024
1 parent 8aac277 commit 1beb0b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/sync/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ console.log(comment);

const stmt = db.prepare("INSERT INTO guest_book_entries (comment) VALUES (?)");
stmt.run(comment);
console.log("max write replication index: " + db.maxWriteReplicationIndex());

const replicated = db.sync();
console.log("frames synced: " + replicated.frames_synced);
console.log("frame no: " + replicated.frame_no);

console.log("Guest book entries:");
const rows = db.prepare("SELECT * FROM guest_book_entries").all();
Expand Down

0 comments on commit 1beb0b5

Please sign in to comment.