Skip to main content

CreateFunction

Struct CreateFunction 

Source
pub struct CreateFunction {
Show 21 fields pub name: TableRef, pub parameters: Vec<FunctionParameter>, pub return_type: Option<DataType>, pub body: Option<FunctionBody>, pub or_replace: bool, pub if_not_exists: bool, pub temporary: bool, pub language: Option<String>, pub deterministic: Option<bool>, pub returns_null_on_null_input: Option<bool>, pub security: Option<FunctionSecurity>, pub has_parens: bool, pub sql_data_access: Option<SqlDataAccess>, pub returns_table_body: Option<String>, pub language_first: bool, pub set_options: Vec<FunctionSetOption>, pub strict: bool, pub options: Vec<Expression>, pub is_table_function: bool, pub property_order: Vec<FunctionPropertyKind>, pub environment: Vec<Expression>,
}
Expand description

CREATE FUNCTION statement

Fields§

§name: TableRef§parameters: Vec<FunctionParameter>§return_type: Option<DataType>§body: Option<FunctionBody>§or_replace: bool§if_not_exists: bool§temporary: bool§language: Option<String>§deterministic: Option<bool>§returns_null_on_null_input: Option<bool>§security: Option<FunctionSecurity>§has_parens: bool

Whether parentheses were present in the original syntax

§sql_data_access: Option<SqlDataAccess>

SQL data access characteristic (CONTAINS SQL, READS SQL DATA, etc.)

§returns_table_body: Option<String>

TSQL: RETURNS @var TABLE (col_defs) - stores the variable name and column definitions as raw string

§language_first: bool

True if LANGUAGE clause appears before RETURNS clause

§set_options: Vec<FunctionSetOption>

PostgreSQL SET options: SET key = value, SET key FROM CURRENT

§strict: bool

True if STRICT was used instead of RETURNS NULL ON NULL INPUT

§options: Vec<Expression>

BigQuery: OPTIONS (key=value, …)

§is_table_function: bool

BigQuery: True if this is a TABLE FUNCTION (CREATE TABLE FUNCTION)

§property_order: Vec<FunctionPropertyKind>

Original order of function properties (SET, AS, LANGUAGE, etc.)

§environment: Vec<Expression>

Databricks: ENVIRONMENT (dependencies = ‘…’, environment_version = ‘…’)

Implementations§

Source§

impl CreateFunction

Source

pub fn new(name: impl Into<String>) -> Self

Trait Implementations§

Source§

impl Clone for CreateFunction

Source§

fn clone(&self) -> CreateFunction

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CreateFunction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CreateFunction

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for CreateFunction

Source§

fn eq(&self, other: &CreateFunction) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for CreateFunction

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for CreateFunction

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,