Struct CreateFunction
pub struct CreateFunction {Show 18 fields
pub or_alter: bool,
pub or_replace: bool,
pub temporary: bool,
pub if_not_exists: bool,
pub name: ObjectName,
pub args: Option<Vec<OperateFunctionArg>>,
pub return_type: Option<DataType>,
pub function_body: Option<CreateFunctionBody>,
pub behavior: Option<FunctionBehavior>,
pub called_on_null: Option<FunctionCalledOnNull>,
pub parallel: Option<FunctionParallel>,
pub security: Option<FunctionSecurity>,
pub set_params: Vec<FunctionDefinitionSetParam>,
pub using: Option<CreateFunctionUsing>,
pub language: Option<Ident>,
pub determinism_specifier: Option<FunctionDeterminismSpecifier>,
pub options: Option<Vec<SqlOption>>,
pub remote_connection: Option<ObjectName>,
}Expand description
CREATE FUNCTION statement
True if this is a CREATE OR ALTER FUNCTION statement
True if this is a CREATE OR REPLACE FUNCTION statement
True if this is a CREATE TEMPORARY FUNCTION statement
True if this is a CREATE IF NOT EXISTS FUNCTION statement
Name of the function to be created.
List of arguments for the function.
The return type of the function.
§function_body: Option<CreateFunctionBody>The expression that defines the function.
Examples:
AS ((SELECT 1))
AS "console.log();"CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT
PARALLEL { UNSAFE | RESTRICTED | SAFE }
USING … (Hive only)
Language used in a UDF definition.
Example:
CREATE FUNCTION foo() LANGUAGE js AS "console.log();"Determinism keyword used for non-sql UDF definitions.
List of options for creating the function.
Connection resource for a remote function.
Example:
CREATE FUNCTION foo()
RETURNS FLOAT64
REMOTE WITH CONNECTION us.myconnection