Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Oct 2, 2024
1 parent 38d2efc commit 14e2b91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Self, String> {
let mut param = String::from("");
ser::write_param(&mut param, &value)?;
Expand Down
3 changes: 3 additions & 0 deletions src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 14e2b91

Please sign in to comment.