sqlparser/dialect/
databricks.rs1use crate::dialect::Dialect;
19
20#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DatabricksDialect {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "DatabricksDialect")
}
}Debug, #[automatically_derived]
impl ::core::default::Default for DatabricksDialect {
#[inline]
fn default() -> DatabricksDialect { DatabricksDialect {} }
}Default, #[automatically_derived]
impl ::core::clone::Clone for DatabricksDialect {
#[inline]
fn clone(&self) -> DatabricksDialect { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for DatabricksDialect { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for DatabricksDialect {
#[inline]
fn eq(&self, other: &DatabricksDialect) -> bool { true }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for DatabricksDialect {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::hash::Hash for DatabricksDialect {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {}
}Hash, #[automatically_derived]
impl ::core::cmp::PartialOrd for DatabricksDialect {
#[inline]
fn partial_cmp(&self, other: &DatabricksDialect)
-> ::core::option::Option<::core::cmp::Ordering> {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Ord for DatabricksDialect {
#[inline]
fn cmp(&self, other: &DatabricksDialect) -> ::core::cmp::Ordering {
::core::cmp::Ordering::Equal
}
}Ord)]
24#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
25pub struct DatabricksDialect;
26
27impl Dialect for DatabricksDialect {
28 fn is_delimited_identifier_start(&self, ch: char) -> bool {
31 #[allow(non_exhaustive_omitted_patterns)] match ch {
'`' => true,
_ => false,
}matches!(ch, '`')
32 }
33
34 fn is_identifier_start(&self, ch: char) -> bool {
35 #[allow(non_exhaustive_omitted_patterns)] match ch {
'a'..='z' | 'A'..='Z' | '_' => true,
_ => false,
}matches!(ch, 'a'..='z' | 'A'..='Z' | '_')
36 }
37
38 fn is_identifier_part(&self, ch: char) -> bool {
39 #[allow(non_exhaustive_omitted_patterns)] match ch {
'a'..='z' | 'A'..='Z' | '0'..='9' | '_' => true,
_ => false,
}matches!(ch, 'a'..='z' | 'A'..='Z' | '0'..='9' | '_')
40 }
41
42 fn supports_filter_during_aggregation(&self) -> bool {
43 true
44 }
45
46 fn supports_group_by_expr(&self) -> bool {
48 true
49 }
50
51 fn supports_table_versioning(&self) -> bool {
53 true
54 }
55
56 fn supports_lambda_functions(&self) -> bool {
57 true
58 }
59
60 fn supports_select_wildcard_except(&self) -> bool {
62 true
63 }
64
65 fn require_interval_qualifier(&self) -> bool {
66 true
67 }
68
69 fn supports_struct_literal(&self) -> bool {
71 true
72 }
73
74 fn supports_nested_comments(&self) -> bool {
76 true
77 }
78
79 fn supports_group_by_with_modifier(&self) -> bool {
81 true
82 }
83
84 fn supports_values_as_table_factor(&self) -> bool {
86 true
87 }
88}