pub struct MaxTableCountRule {
pub max: usize,
}Expand description
表数量上限规则
限制单条 SQL 涉及的表数量(FROM/JOIN/INTO/UPDATE 后的标识符), 防止过度复杂的跨表查询。
Fields§
§max: usize允许的最大表数量
Implementations§
Trait Implementations§
Source§impl Debug for MaxTableCountRule
impl Debug for MaxTableCountRule
Source§impl SqlRule for MaxTableCountRule
impl SqlRule for MaxTableCountRule
Source§fn severity(&self) -> RuleSeverity
fn severity(&self) -> RuleSeverity
规则的默认严重级别
Source§fn check(&self, ctx: &RuleContext) -> Option<RuleViolation>
fn check(&self, ctx: &RuleContext) -> Option<RuleViolation>
检查 SQL 上下文,返回
Some(violation) 表示违规,None 表示通过Auto Trait Implementations§
impl Freeze for MaxTableCountRule
impl RefUnwindSafe for MaxTableCountRule
impl Send for MaxTableCountRule
impl Sync for MaxTableCountRule
impl Unpin for MaxTableCountRule
impl UnsafeUnpin for MaxTableCountRule
impl UnwindSafe for MaxTableCountRule
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