pub struct DialectProfile {Show 14 fields
pub dialect: SqlDialect,
pub quote_style: IdentifierQuoting,
pub supports_cte: bool,
pub supports_window_functions: bool,
pub supports_json_operations: bool,
pub max_joins: Option<usize>,
pub allowed_join_types: Vec<JoinType>,
pub allowed_functions: Vec<String>,
pub denied_functions: Vec<String>,
pub max_group_by_columns: Option<usize>,
pub allow_distinct: bool,
pub allow_select_distinct: bool,
pub supports_offset: bool,
pub supports_fetch: bool,
}Expand description
The SQL capabilities allowed for one query-planning context.
Each profile captures the dialect family, identifier quoting
convention, the set of allowed / denied features, and a few
quantitative limits that the validator and SQL compiler consult.
Use DialectProfile::builder to construct a customized profile
from the defaults.
§Examples
use vlorql_core::schema::{DialectProfile, SqlDialect, JoinType};
let profile = DialectProfile::builder()
.dialect(SqlDialect::Sqlite)
.max_joins(5)
.build()
.expect("valid profile");
assert_eq!(profile.dialect, SqlDialect::Sqlite);
assert_eq!(profile.max_joins, Some(5));Fields§
§dialect: SqlDialectThe SQL dialect this profile emits.
quote_style: IdentifierQuotingHow identifiers should be quoted in the generated SQL.
supports_cte: boolWhether WITH <cte> ... SELECT ... is allowed.
supports_window_functions: boolWhether window functions are allowed.
supports_json_operations: boolWhether JSON operators (->, ->>, @@, …) are allowed.
max_joins: Option<usize>Maximum number of joins permitted in a single plan. None
means no limit.
allowed_join_types: Vec<JoinType>The join types the validator allows. An empty list means “all join types allowed”.
allowed_functions: Vec<String>The function names the validator allows. An empty list means “any function not explicitly denied”.
denied_functions: Vec<String>The function names the validator always rejects.
max_group_by_columns: Option<usize>Maximum number of GROUP BY expressions. None means no
limit.
allow_distinct: boolWhether DISTINCT is permitted inside function calls.
allow_select_distinct: boolWhether SELECT DISTINCT (whole-query dedup) is allowed.
supports_offset: boolWhether OFFSET n is allowed.
supports_fetch: boolWhether FETCH FIRST n ROWS ONLY is allowed.
Implementations§
Source§impl DialectProfile
impl DialectProfile
Sourcepub fn builder() -> DialectProfileBuilder
pub fn builder() -> DialectProfileBuilder
Returns a builder initialized with the profile defaults.
Trait Implementations§
Source§impl Clone for DialectProfile
impl Clone for DialectProfile
Source§fn clone(&self) -> DialectProfile
fn clone(&self) -> DialectProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DialectProfile
impl Debug for DialectProfile
Source§impl Default for DialectProfile
impl Default for DialectProfile
Source§impl<'de> Deserialize<'de> for DialectProfilewhere
DialectProfile: Default,
impl<'de> Deserialize<'de> for DialectProfilewhere
DialectProfile: Default,
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>,
impl Eq for DialectProfile
Source§impl JsonSchema for DialectProfile
impl JsonSchema for DialectProfile
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for DialectProfile
impl PartialEq for DialectProfile
Source§impl Serialize for DialectProfile
impl Serialize for DialectProfile
impl StructuralPartialEq for DialectProfile
Auto Trait Implementations§
impl Freeze for DialectProfile
impl RefUnwindSafe for DialectProfile
impl Send for DialectProfile
impl Sync for DialectProfile
impl Unpin for DialectProfile
impl UnsafeUnpin for DialectProfile
impl UnwindSafe for DialectProfile
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request