mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-08 01:15:00 +00:00
Encapsulate CreateFunction (#1573)
This commit is contained in:
parent
bd750dfada
commit
e16b24679a
6 changed files with 149 additions and 148 deletions
|
@ -3631,7 +3631,7 @@ fn parse_create_function() {
|
|||
let sql = "CREATE FUNCTION add(INTEGER, INTEGER) RETURNS INTEGER LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE AS 'select $1 + $2;'";
|
||||
assert_eq!(
|
||||
pg_and_generic().verified_stmt(sql),
|
||||
Statement::CreateFunction {
|
||||
Statement::CreateFunction(CreateFunction {
|
||||
or_replace: false,
|
||||
temporary: false,
|
||||
name: ObjectName(vec![Ident::new("add")]),
|
||||
|
@ -3652,7 +3652,7 @@ fn parse_create_function() {
|
|||
determinism_specifier: None,
|
||||
options: None,
|
||||
remote_connection: None,
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -4987,7 +4987,7 @@ fn parse_trigger_related_functions() {
|
|||
|
||||
assert_eq!(
|
||||
create_function,
|
||||
Statement::CreateFunction {
|
||||
Statement::CreateFunction(CreateFunction {
|
||||
or_replace: false,
|
||||
temporary: false,
|
||||
if_not_exists: false,
|
||||
|
@ -5017,7 +5017,7 @@ fn parse_trigger_related_functions() {
|
|||
options: None,
|
||||
remote_connection: None
|
||||
}
|
||||
);
|
||||
));
|
||||
|
||||
// Check the third statement
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue