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
Fields§
§or_alter: boolTrue if this is a CREATE OR ALTER FUNCTION statement
or_replace: boolTrue if this is a CREATE OR REPLACE FUNCTION statement
temporary: boolTrue if this is a CREATE TEMPORARY FUNCTION statement
if_not_exists: boolTrue if this is a CREATE IF NOT EXISTS FUNCTION statement
name: ObjectNameName of the function to be created.
args: Option<Vec<OperateFunctionArg>>List of arguments for the function.
return_type: Option<DataType>The return type of the function.
function_body: Option<CreateFunctionBody>The expression that defines the function.
Examples:
AS ((SELECT 1))
AS "console.log();"behavior: Option<FunctionBehavior>§called_on_null: Option<FunctionCalledOnNull>CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT
parallel: Option<FunctionParallel>PARALLEL { UNSAFE | RESTRICTED | SAFE }
security: Option<FunctionSecurity>SECURITY { DEFINER | INVOKER }
set_params: Vec<FunctionDefinitionSetParam>SET configuration_parameter clauses
using: Option<CreateFunctionUsing>USING … (Hive only)
language: Option<Ident>Language used in a UDF definition.
Example:
CREATE FUNCTION foo() LANGUAGE js AS "console.log();"determinism_specifier: Option<FunctionDeterminismSpecifier>Determinism keyword used for non-sql UDF definitions.
options: Option<Vec<SqlOption>>List of options for creating the function.
remote_connection: Option<ObjectName>Connection resource for a remote function.
Example:
CREATE FUNCTION foo()
RETURNS FLOAT64
REMOTE WITH CONNECTION us.myconnectionTrait Implementations§
Source§impl Clone for CreateFunction
impl Clone for CreateFunction
Source§fn clone(&self) -> CreateFunction
fn clone(&self) -> CreateFunction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CreateFunction
impl Debug for CreateFunction
Source§impl Display for CreateFunction
impl Display for CreateFunction
Source§impl From<CreateFunction> for Statement
impl From<CreateFunction> for Statement
Source§fn from(c: CreateFunction) -> Self
fn from(c: CreateFunction) -> Self
Source§impl Hash for CreateFunction
impl Hash for CreateFunction
Source§impl Ord for CreateFunction
impl Ord for CreateFunction
Source§fn cmp(&self, other: &CreateFunction) -> Ordering
fn cmp(&self, other: &CreateFunction) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for CreateFunction
impl PartialEq for CreateFunction
Source§impl PartialOrd for CreateFunction
impl PartialOrd for CreateFunction
Source§impl Visit for CreateFunction
impl Visit for CreateFunction
Source§impl VisitMut for CreateFunction
impl VisitMut for CreateFunction
Source§fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
VisitorMut. Read more