Skip to main content

is_read_only

Function is_read_only 

Source
fn is_read_only(stmt: &Statement) -> bool
Expand description

判断语句是否只读(无副作用的查询 / 非 ANALYZE 的 EXPLAIN / SHOW 系列)。

查询与 EXPLAIN 的判定与数据导出共用 is_read_only_statement: EXPLAIN ANALYZE <DML>、data-modifying CTE、SELECT INTO、行锁查询都算写。