pub struct RewriterConfig {
pub enabled: bool,
pub log_rewrites: bool,
pub log_errors: bool,
pub rules: Vec<RewriteRule>,
pub expand_select_star: bool,
pub add_default_limit: bool,
pub default_limit: u32,
pub max_query_length: usize,
pub cache_enabled: bool,
pub cache_ttl: Duration,
pub max_cache_entries: usize,
pub agent_safety: AgentSafetyConfig,
}Expand description
Query rewriter configuration
Fields§
§enabled: boolEnable query rewriting
log_rewrites: boolLog rewrite operations
log_errors: boolLog rewrite errors
rules: Vec<RewriteRule>Rewrite rules
expand_select_star: boolAutomatically expand SELECT * to column list
add_default_limit: boolAdd default LIMIT to queries without one
default_limit: u32Default LIMIT value
max_query_length: usizeMaximum query length to process
cache_enabled: boolCache rewritten queries by fingerprint
cache_ttl: DurationCache TTL
max_cache_entries: usizeMaximum cache entries
agent_safety: AgentSafetyConfigAgent query safety rules
Implementations§
Source§impl RewriterConfig
impl RewriterConfig
Sourcepub fn builder() -> RewriterConfigBuilder
pub fn builder() -> RewriterConfigBuilder
Create a builder
Trait Implementations§
Source§impl Clone for RewriterConfig
impl Clone for RewriterConfig
Source§fn clone(&self) -> RewriterConfig
fn clone(&self) -> RewriterConfig
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 RewriterConfig
impl Debug for RewriterConfig
Auto Trait Implementations§
impl Freeze for RewriterConfig
impl RefUnwindSafe for RewriterConfig
impl Send for RewriterConfig
impl Sync for RewriterConfig
impl Unpin for RewriterConfig
impl UnsafeUnpin for RewriterConfig
impl UnwindSafe for RewriterConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more