File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -222,9 +222,10 @@ pub fn derive_model_helper(_item: TokenStream) -> TokenStream {
222222/// operators.
223223///
224224/// ```
225- /// use cot::db::{model, query};
225+ /// use cot::db::{Database, model, query};
226226///
227227/// #[model]
228+ /// #[derive(Debug, Clone)]
228229/// struct Customer {
229230/// #[model(primary_key)]
230231/// id: i32,
@@ -236,8 +237,8 @@ pub fn derive_model_helper(_item: TokenStream) -> TokenStream {
236237/// is_active: bool
237238/// }
238239///
239- /// # async fn run(db: Database) -> cot::Result<()> {
240- /// let customer = query!(Customer, $id > 5 && $full_name == "Jon Doe" ).await?;
240+ /// # async fn run(db: Database) -> cot::Result<()> {
241+ /// let customer = query!(Customer, $id == 5).get(&db ).await?;
241242/// println!("Customer: {:?}", customer);
242243/// # Ok(())
243244/// # }
You can’t perform that action at this time.
0 commit comments