CreateFunction in sqlparser::ast - Rust

Struct CreateFunction 

Source

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

MsSql

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();"

Behavior attribute for the function

IMMUTABLE | STABLE | VOLATILE

PostgreSQL

CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT

PostgreSQL

PARALLEL { UNSAFE | RESTRICTED | SAFE }

PostgreSQL

USING … (Hive only)

Language used in a UDF definition.

Example:

CREATE FUNCTION foo() LANGUAGE js AS "console.log();"

BigQuery

Determinism keyword used for non-sql UDF definitions.

BigQuery

List of options for creating the function.

BigQuery

Connection resource for a remote function.

Example:

CREATE FUNCTION foo()
RETURNS FLOAT64
REMOTE WITH CONNECTION us.myconnection

BigQuery

§
§
§
§
§
§