pub struct SelectQuery { /* private fields */ }Expand description
SELECT 查询构造器
Implementations§
Source§impl SelectQuery
impl SelectQuery
Sourcepub fn all_columns(self) -> Self
pub fn all_columns(self) -> Self
添加 * 列
Sourcepub fn inner_join(self, table: &str, on: &str) -> Self
pub fn inner_join(self, table: &str, on: &str) -> Self
Sourcepub fn right_join(self, table: &str, on: &str) -> Self
pub fn right_join(self, table: &str, on: &str) -> Self
Sourcepub fn where_clause(self, condition: &str) -> Self
pub fn where_clause(self, condition: &str) -> Self
添加 WHERE 条件(AND 连接)
§安全性(v0.2.2 修复 C-6)
调用 check_where_injection 检测高危模式(分号+SQL 关键字、行注释、块注释)。
复杂 WHERE 条件应使用参数化查询 API,避免直接拼接字符串。
Trait Implementations§
Source§impl Clone for SelectQuery
impl Clone for SelectQuery
Source§fn clone(&self) -> SelectQuery
fn clone(&self) -> SelectQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SelectQuery
impl Debug for SelectQuery
Source§impl Default for SelectQuery
impl Default for SelectQuery
Source§fn default() -> SelectQuery
fn default() -> SelectQuery
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SelectQuery
impl RefUnwindSafe for SelectQuery
impl Send for SelectQuery
impl Sync for SelectQuery
impl Unpin for SelectQuery
impl UnsafeUnpin for SelectQuery
impl UnwindSafe for SelectQuery
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more