Skip to content

Commit

Permalink
Updated example
Browse files Browse the repository at this point in the history
  • Loading branch information
abdolence committed Feb 17, 2024
1 parent cfdde89 commit a8fc257
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/reference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,15 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
println!("Collection name: {:?}", collection_name);
println!("Parent Path: {:?}", parent_path);

// Read by reference
let object_returned: Option<FirestoreDocument> = db
.fluent()
.select()
.by_id_in(&collection_name)
.one(document_id)
.await?;

println!("Object by reference: {:?}", object_returned);

Ok(())
}

0 comments on commit a8fc257

Please sign in to comment.