pub struct FilterBuilder { /* private fields */ }Expand description
Implementations§
Source§impl FilterBuilder
impl FilterBuilder
Sourcepub fn sess_id_eq(self, value: impl Into<String>) -> Self
pub fn sess_id_eq(self, value: impl Into<String>) -> Self
sess_id 等于指定值(FILTER-04)。
Sourcepub fn thrd_id_eq(self, value: impl Into<String>) -> Self
pub fn thrd_id_eq(self, value: impl Into<String>) -> Self
thrd_id 等于指定值(FILTER-04)。
Sourcepub fn username_eq(self, value: impl Into<String>) -> Self
pub fn username_eq(self, value: impl Into<String>) -> Self
username 等于指定值(FILTER-04)。
Sourcepub fn statement_eq(self, value: impl Into<String>) -> Self
pub fn statement_eq(self, value: impl Into<String>) -> Self
statement 等于指定值(FILTER-04)。
Sourcepub fn appname_eq(self, value: impl Into<String>) -> Self
pub fn appname_eq(self, value: impl Into<String>) -> Self
appname 等于指定值(FILTER-04)。
Sourcepub fn client_ip_eq(self, value: impl Into<String>) -> Self
pub fn client_ip_eq(self, value: impl Into<String>) -> Self
client_ip 等于指定值(FILTER-04)。
Sourcepub fn sql_contains(self, pattern: impl Into<String>) -> Self
pub fn sql_contains(self, pattern: impl Into<String>) -> Self
SQL 语句包含指定子串(FILTER-05)。
Sourcepub fn sql_starts_with(self, prefix: impl Into<String>) -> Self
pub fn sql_starts_with(self, prefix: impl Into<String>) -> Self
SQL 语句以指定前缀开头(FILTER-05)。
Sourcepub fn sql_ends_with(self, suffix: impl Into<String>) -> Self
pub fn sql_ends_with(self, suffix: impl Into<String>) -> Self
SQL 语句以指定后缀结尾(FILTER-05)。
Sourcepub fn exec_time_gt(self, min_ms: f32) -> Self
pub fn exec_time_gt(self, min_ms: f32) -> Self
执行时间大于 min_ms 毫秒(严格不等,FILTER-06)。
参数单位为毫秒;f32 精度约 7 位有效数字,不提供 exec_time_eq 方法以避免误用。
Sourcepub fn exec_time_gte(self, min_ms: f32) -> Self
pub fn exec_time_gte(self, min_ms: f32) -> Self
执行时间大于等于 min_ms 毫秒(含边界,FILTER-06)。
与 [LogIterator::filter_by_exec_time] 语义一致(>=)。
参数单位为毫秒;f32 精度约 7 位有效数字。
Sourcepub fn exec_time_lt(self, max_ms: f32) -> Self
pub fn exec_time_lt(self, max_ms: f32) -> Self
执行时间小于 max_ms 毫秒(FILTER-06)。
参数单位为毫秒;f32 精度约 7 位有效数字,不提供 exec_time_eq 方法以避免误用。
Sourcepub fn exec_time_between(self, min_ms: f32, max_ms: f32) -> Self
pub fn exec_time_between(self, min_ms: f32, max_ms: f32) -> Self
执行时间在闭区间 [min_ms, max_ms] 毫秒内(FILTER-06)。
参数单位为毫秒;f32 精度约 7 位有效数字,不提供 exec_time_eq 方法以避免误用。
§Panics
当 min_ms > max_ms 时 panic。
Sourcepub fn rowcount_eq(self, value: u32) -> Self
pub fn rowcount_eq(self, value: u32) -> Self
影响行数等于指定值(FILTER-07)。
Sourcepub fn rowcount_gt(self, value: u32) -> Self
pub fn rowcount_gt(self, value: u32) -> Self
影响行数大于指定值(FILTER-07)。
Sourcepub fn rowcount_lt(self, value: u32) -> Self
pub fn rowcount_lt(self, value: u32) -> Self
影响行数小于指定值(FILTER-07)。
Sourcepub fn exec_id_eq(self, value: i64) -> Self
pub fn exec_id_eq(self, value: i64) -> Self
执行 ID 等于指定值(FILTER-08)。
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FilterBuilder
impl !UnwindSafe for FilterBuilder
impl Freeze for FilterBuilder
impl Send for FilterBuilder
impl Sync for FilterBuilder
impl Unpin for FilterBuilder
impl UnsafeUnpin for FilterBuilder
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