We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b318da commit ee0f8c6Copy full SHA for ee0f8c6
2 files changed
src/lib.rs
@@ -379,8 +379,9 @@ impl Database {
379
}
380
381
#[napi]
382
- pub fn maxWriteReplicationIndex(&self) -> Result<()> {
383
- todo!();
+ pub fn maxWriteReplicationIndex(&self) -> Result<f64> {
+ let result = self.db.max_write_replication_index();
384
+ Ok(result.unwrap_or(0) as f64)
385
386
387
wrapper.js
@@ -168,7 +168,11 @@ class Database {
168
169
170
maxWriteReplicationIndex() {
171
- throw new Error("not implemented");
+ try {
172
+ return this.db.maxWriteReplicationIndex();
173
+ } catch (err) {
174
+ throw convertError(err);
175
+ }
176
177
178
/**
0 commit comments