From a8fc25713b67d46baa04041a2d68818f2f115bf8 Mon Sep 17 00:00:00 2001 From: Abdulla Abdurakhmanov Date: Sat, 17 Feb 2024 12:18:08 +0100 Subject: [PATCH] Updated example --- examples/reference.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/examples/reference.rs b/examples/reference.rs index aa418c9..4ecb04e 100644 --- a/examples/reference.rs +++ b/examples/reference.rs @@ -70,5 +70,15 @@ async fn main() -> Result<(), Box> { println!("Collection name: {:?}", collection_name); println!("Parent Path: {:?}", parent_path); + // Read by reference + let object_returned: Option = db + .fluent() + .select() + .by_id_in(&collection_name) + .one(document_id) + .await?; + + println!("Object by reference: {:?}", object_returned); + Ok(()) }