From 14e2b9187fd5927080e7d66af6b684f5c8774014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Wed, 2 Oct 2024 17:55:47 +0000 Subject: [PATCH] doc --- src/lib.rs | 3 +++ src/query.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index fda89e1..c84850c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -161,6 +161,9 @@ impl Client { self } + /// Specify server side parameter for all this client's queries. + /// + /// See also [`Query::with_param`]. pub fn with_param(self, name: &str, value: impl Serialize) -> Result { let mut param = String::from(""); ser::write_param(&mut param, &value)?; diff --git a/src/query.rs b/src/query.rs index fd4e2d9..8d93bfe 100644 --- a/src/query.rs +++ b/src/query.rs @@ -196,6 +196,9 @@ impl Query { self } + /// Specify server side parameter for query. + /// + /// In queries you can reference params as {name: type} e.g. {val: Int32}. pub fn with_param(mut self, name: &str, value: impl Serialize) -> Self { let mut param = String::from(""); if let Err(err) = ser::write_param(&mut param, &value) {