1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use async_trait::async_trait;
use bonsaidb_core::keyvalue::AsyncKeyValue;
use bonsaidb_core::networking::ExecuteKeyOperation;

#[async_trait]
impl AsyncKeyValue for super::AsyncRemoteDatabase {
    async fn execute_key_operation(
        &self,
        op: bonsaidb_core::keyvalue::KeyOperation,
    ) -> Result<bonsaidb_core::keyvalue::Output, bonsaidb_core::Error> {
        Ok(self
            .client
            .send_api_request(&ExecuteKeyOperation {
                database: self.name.to_string(),

                op,
            })
            .await?)
    }
}