mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
implementations for DbTx functions for TxMock (#5015)
This commit is contained in:
committed by
GitHub
parent
6b79978747
commit
916b6b3b28
@ -60,25 +60,23 @@ impl DbTx for TxMock {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn commit(self) -> Result<bool, DatabaseError> {
|
fn commit(self) -> Result<bool, DatabaseError> {
|
||||||
todo!()
|
Ok(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn drop(self) {
|
fn drop(self) {}
|
||||||
todo!()
|
|
||||||
}
|
|
||||||
|
|
||||||
fn cursor_read<T: Table>(&self) -> Result<<Self as DbTxGAT<'_>>::Cursor<T>, DatabaseError> {
|
fn cursor_read<T: Table>(&self) -> Result<<Self as DbTxGAT<'_>>::Cursor<T>, DatabaseError> {
|
||||||
todo!()
|
Ok(CursorMock { _cursor: 0 })
|
||||||
}
|
}
|
||||||
|
|
||||||
fn cursor_dup_read<T: DupSort>(
|
fn cursor_dup_read<T: DupSort>(
|
||||||
&self,
|
&self,
|
||||||
) -> Result<<Self as DbTxGAT<'_>>::DupCursor<T>, DatabaseError> {
|
) -> Result<<Self as DbTxGAT<'_>>::DupCursor<T>, DatabaseError> {
|
||||||
todo!()
|
Ok(CursorMock { _cursor: 0 })
|
||||||
}
|
}
|
||||||
|
|
||||||
fn entries<T: Table>(&self) -> Result<usize, DatabaseError> {
|
fn entries<T: Table>(&self) -> Result<usize, DatabaseError> {
|
||||||
todo!()
|
Ok(self._table.len())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user