pub struct FormatGuardOptions {
pub max_input_bytes: Option<usize>,
pub max_tokens: Option<usize>,
pub max_ast_nodes: Option<usize>,
pub max_set_op_chain: Option<usize>,
}Expand description
Guard options for SQL pretty-formatting.
These limits protect against extremely large/complex queries that can cause high memory pressure in constrained runtimes (for example browser WASM).
Fields§
§max_input_bytes: Option<usize>Maximum allowed SQL input size in bytes.
None disables this check.
max_tokens: Option<usize>Maximum allowed number of tokens after tokenization.
None disables this check.
max_ast_nodes: Option<usize>Maximum allowed AST node count after parsing.
None disables this check.
max_set_op_chain: Option<usize>Maximum allowed count of set-operation operators (UNION/INTERSECT/EXCEPT)
observed in a statement before parsing.
None disables this check.
Trait Implementations§
Source§impl Clone for FormatGuardOptions
impl Clone for FormatGuardOptions
Source§fn clone(&self) -> FormatGuardOptions
fn clone(&self) -> FormatGuardOptions
Returns a duplicate of the value. Read more
1.0.0 · 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 FormatGuardOptions
impl Debug for FormatGuardOptions
Source§impl Default for FormatGuardOptions
impl Default for FormatGuardOptions
Source§impl<'de> Deserialize<'de> for FormatGuardOptions
impl<'de> Deserialize<'de> for FormatGuardOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for FormatGuardOptions
impl Serialize for FormatGuardOptions
impl Copy for FormatGuardOptions
Auto Trait Implementations§
impl Freeze for FormatGuardOptions
impl RefUnwindSafe for FormatGuardOptions
impl Send for FormatGuardOptions
impl Sync for FormatGuardOptions
impl Unpin for FormatGuardOptions
impl UnsafeUnpin for FormatGuardOptions
impl UnwindSafe for FormatGuardOptions
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