We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I propose to change the api of the apply_batch method in transactions from:
apply_batch
pub fn apply_batch( &self, batch: Batch, ) -> UnabortableTransactionResult<()>
to
pub fn apply_batch( &self, batch: &Batch, ) -> UnabortableTransactionResult<()>
This will then mean that it will be possible to write code like this:
let db = config.open().unwrap(); let t1 = db.open_tree(b"1")?; let mut b1 = Batch::default(); b1.insert(b"k1", b"v1"); b1.insert(b"k2", b"v2"); t1.transaction(|tree| { tree.apply_batch(&b1)?; Ok(()) })?;
The text was updated successfully, but these errors were encountered:
I like it! Thanks for improving this API :)
Sorry, something went wrong.
No branches or pull requests
I propose to change the api of the
apply_batch
method in transactions from:to
This will then mean that it will be possible to write code like this:
The text was updated successfully, but these errors were encountered: