Encapsulate CreateFunction (#1573)

This commit is contained in:
Philip Cristiano 2024-12-02 12:45:14 -05:00 committed by GitHub
parent bd750dfada
commit e16b24679a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 149 additions and 148 deletions

View file

@ -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