mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-23 07:24:10 +00:00
Add support for ODBC functions (#1585)
This commit is contained in:
parent
04271b0e4e
commit
a13f8c6b93
15 changed files with 142 additions and 6 deletions
|
@ -2529,6 +2529,7 @@ fn parse_array_subquery_expr() {
|
|||
assert_eq!(
|
||||
&Expr::Function(Function {
|
||||
name: ObjectName(vec![Ident::new("ARRAY")]),
|
||||
uses_odbc_syntax: false,
|
||||
parameters: FunctionArguments::None,
|
||||
args: FunctionArguments::Subquery(Box::new(Query {
|
||||
with: None,
|
||||
|
@ -2911,6 +2912,7 @@ fn test_composite_value() {
|
|||
Ident::new("information_schema"),
|
||||
Ident::new("_pg_expandarray")
|
||||
]),
|
||||
uses_odbc_syntax: false,
|
||||
parameters: FunctionArguments::None,
|
||||
args: FunctionArguments::List(FunctionArgumentList {
|
||||
duplicate_treatment: None,
|
||||
|
@ -3088,6 +3090,7 @@ fn parse_current_functions() {
|
|||
assert_eq!(
|
||||
&Expr::Function(Function {
|
||||
name: ObjectName(vec![Ident::new("CURRENT_CATALOG")]),
|
||||
uses_odbc_syntax: false,
|
||||
parameters: FunctionArguments::None,
|
||||
args: FunctionArguments::None,
|
||||
null_treatment: None,
|
||||
|
@ -3100,6 +3103,7 @@ fn parse_current_functions() {
|
|||
assert_eq!(
|
||||
&Expr::Function(Function {
|
||||
name: ObjectName(vec![Ident::new("CURRENT_USER")]),
|
||||
uses_odbc_syntax: false,
|
||||
parameters: FunctionArguments::None,
|
||||
args: FunctionArguments::None,
|
||||
null_treatment: None,
|
||||
|
@ -3112,6 +3116,7 @@ fn parse_current_functions() {
|
|||
assert_eq!(
|
||||
&Expr::Function(Function {
|
||||
name: ObjectName(vec![Ident::new("SESSION_USER")]),
|
||||
uses_odbc_syntax: false,
|
||||
parameters: FunctionArguments::None,
|
||||
args: FunctionArguments::None,
|
||||
null_treatment: None,
|
||||
|
@ -3124,6 +3129,7 @@ fn parse_current_functions() {
|
|||
assert_eq!(
|
||||
&Expr::Function(Function {
|
||||
name: ObjectName(vec![Ident::new("USER")]),
|
||||
uses_odbc_syntax: false,
|
||||
parameters: FunctionArguments::None,
|
||||
args: FunctionArguments::None,
|
||||
null_treatment: None,
|
||||
|
@ -3599,6 +3605,7 @@ fn parse_delimited_identifiers() {
|
|||
assert_eq!(
|
||||
&Expr::Function(Function {
|
||||
name: ObjectName(vec![Ident::with_quote('"', "myfun")]),
|
||||
uses_odbc_syntax: false,
|
||||
parameters: FunctionArguments::None,
|
||||
args: FunctionArguments::List(FunctionArgumentList {
|
||||
duplicate_treatment: None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue