pub struct DialectConfig {Show 19 fields
pub name: String,
pub identifier_quote: String,
pub placeholder: String,
pub limit_offset: String,
pub top_syntax: Option<String>,
pub supports_cte: bool,
pub supports_window_functions: bool,
pub supports_json_operations: bool,
pub supports_offset: bool,
pub supports_fetch: bool,
pub allow_distinct: bool,
pub allow_select_distinct: bool,
pub max_joins: Option<usize>,
pub allowed_join_types: Vec<String>,
pub allowed_functions: Vec<String>,
pub denied_functions: Vec<String>,
pub max_group_by_columns: Option<usize>,
pub type_mappings: HashMap<String, String>,
pub function_name_mappings: HashMap<String, String>,
}Expand description
A configurable SQL dialect definition loaded from TOML/YAML.
Fields§
§name: String§identifier_quote: String§placeholder: String§limit_offset: String§top_syntax: Option<String>§supports_cte: bool§supports_window_functions: bool§supports_json_operations: bool§supports_offset: bool§supports_fetch: bool§allow_distinct: bool§allow_select_distinct: bool§max_joins: Option<usize>§allowed_join_types: Vec<String>§allowed_functions: Vec<String>§denied_functions: Vec<String>§max_group_by_columns: Option<usize>§type_mappings: HashMap<String, String>§function_name_mappings: HashMap<String, String>Implementations§
Source§impl DialectConfig
impl DialectConfig
pub fn placeholder_str(&self, index: usize) -> String
pub fn quote_identifier(&self, ident: &str) -> String
pub fn render_limit_offset( &self, limit: Option<u64>, offset: Option<u64>, ) -> Option<String>
pub fn render_top(&self, limit: u64) -> Option<String>
pub fn default_postgres() -> Self
pub fn default_sqlite() -> Self
pub fn default_mysql() -> Self
pub fn from_toml(path: impl AsRef<Path>) -> Result<Self, VlorQLError>
pub fn from_yaml(path: impl AsRef<Path>) -> Result<Self, VlorQLError>
Trait Implementations§
Source§impl Clone for DialectConfig
impl Clone for DialectConfig
Source§impl Debug for DialectConfig
impl Debug for DialectConfig
Source§impl Default for DialectConfig
impl Default for DialectConfig
Source§impl<'de> Deserialize<'de> for DialectConfigwhere
DialectConfig: Default,
impl<'de> Deserialize<'de> for DialectConfigwhere
DialectConfig: 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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for DialectConfig
impl JsonSchema for DialectConfig
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Forget for DialectConfig
impl Freeze for DialectConfigwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<(String, String)>: Freeze,
impl Move for DialectConfig
impl RefUnwindSafe for DialectConfig
impl Send for DialectConfig
impl Sync for DialectConfig
impl Unpin for DialectConfig
impl UnsafeUnpin for DialectConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
impl UnwindSafe for DialectConfig
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
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<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>
Wrap the input message
T in a tonic::Request