From 03d90d8630f40d0a81fb2c8a24605402fb63b327 Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Tue, 9 Nov 2021 16:14:51 +0800 Subject: [PATCH] Docs --- src/database/statement.rs | 7 ++++--- src/executor/select.rs | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/database/statement.rs b/src/database/statement.rs index ce911295..a1ba8126 100644 --- a/src/database/statement.rs +++ b/src/database/statement.rs @@ -8,9 +8,10 @@ use std::fmt; pub struct Statement { /// The SQL query pub sql: String, - /// The values for the SQL statement + /// The values for the SQL statement's parameters pub values: Option, - /// The database backend to use + /// The database backend this statement is constructed for. + /// The SQL dialect and values should be valid for the DbBackend. pub db_backend: DbBackend, } @@ -31,7 +32,7 @@ impl Statement { } /// Create a SQL statement from a [crate::DatabaseBackend], a - /// raw SQL statement and defined values + /// raw SQL statement and param values pub fn from_sql_and_values(db_backend: DbBackend, sql: &str, values: I) -> Self where I: IntoIterator, diff --git a/src/executor/select.rs b/src/executor/select.rs index 5acdae02..f9bbd756 100644 --- a/src/executor/select.rs +++ b/src/executor/select.rs @@ -11,7 +11,7 @@ use std::pin::Pin; #[cfg(feature = "with-json")] use crate::JsonValue; -/// Defines a type to do `SELECT` operations though a [SelectStatement] on a Model +/// Defines a type to do `SELECT` operations through a [SelectStatement] on a Model #[derive(Clone, Debug)] pub struct Selector where