pub struct CreateFunction {Show 16 fields
pub name: String,
pub catalog_name: String,
pub schema_name: String,
pub data_type: String,
pub full_data_type: String,
pub input_params: MessageField<FunctionParameterInfos>,
pub parameter_style: EnumValue<ParameterStyle>,
pub is_deterministic: bool,
pub sql_data_access: EnumValue<SqlDataAccess>,
pub is_null_call: bool,
pub security_type: EnumValue<SecurityType>,
pub routine_body: EnumValue<RoutineBody>,
pub routine_definition: Option<String>,
pub routine_body_language: Option<String>,
pub comment: Option<String>,
pub properties: HashMap<String, String>,
/* private fields */
}Expand description
The payload for creating a new function.
Wrapped in the function_info envelope of a CreateFunctionRequest, matching
the Unity Catalog POST /functions wire contract.
Fields§
§name: StringName of function, relative to parent schema.
Field 1: name
catalog_name: StringName of parent catalog.
Field 2: catalog_name
schema_name: StringName of parent schema.
Field 3: schema_name
data_type: StringFull data type specification of the return type of the function.
Field 4: data_type
full_data_type: StringFull data type specification as SQL/catalogString text.
Field 5: full_data_type
input_params: MessageField<FunctionParameterInfos>The array of function parameter infos.
Field 6: input_params
parameter_style: EnumValue<ParameterStyle>The parameter-passing style.
Field 7: parameter_style
is_deterministic: boolIndicates whether the function is deterministic.
Field 8: is_deterministic
sql_data_access: EnumValue<SqlDataAccess>SQL data access information.
Field 9: sql_data_access
is_null_call: boolIndicates whether the function is null-calling.
Field 10: is_null_call
security_type: EnumValue<SecurityType>The security type of the function.
Field 11: security_type
routine_body: EnumValue<RoutineBody>The routine body.
Field 12: routine_body
routine_definition: Option<String>Function body.
Field 13: routine_definition
routine_body_language: Option<String>The language of the function routine body.
Field 14: routine_body_language
comment: Option<String>User-provided free-form text description.
Field 15: comment
properties: HashMap<String, String>A map of key-value properties attached to the securable.
Field 16: properties
Implementations§
Source§impl CreateFunction
impl CreateFunction
Sourcepub fn with_routine_definition(self, value: impl Into<String>) -> Self
pub fn with_routine_definition(self, value: impl Into<String>) -> Self
Sets Self::routine_definition to Some(value), consuming and returning self.
Sourcepub fn with_routine_body_language(self, value: impl Into<String>) -> Self
pub fn with_routine_body_language(self, value: impl Into<String>) -> Self
Sets Self::routine_body_language to Some(value), consuming and returning self.
Sourcepub fn with_comment(self, value: impl Into<String>) -> Self
pub fn with_comment(self, value: impl Into<String>) -> Self
Sets Self::comment to Some(value), consuming and returning self.
Source§impl CreateFunction
impl CreateFunction
Sourcepub fn new(
name: impl Into<String>,
catalog_name: impl Into<String>,
schema_name: impl Into<String>,
data_type: impl Into<String>,
full_data_type: impl Into<String>,
parameter_style: ParameterStyle,
is_deterministic: bool,
sql_data_access: SqlDataAccess,
is_null_call: bool,
security_type: SecurityType,
routine_body: RoutineBody,
) -> Self
pub fn new( name: impl Into<String>, catalog_name: impl Into<String>, schema_name: impl Into<String>, data_type: impl Into<String>, full_data_type: impl Into<String>, parameter_style: ParameterStyle, is_deterministic: bool, sql_data_access: SqlDataAccess, is_null_call: bool, security_type: SecurityType, routine_body: RoutineBody, ) -> Self
Create a CreateFunction payload from the required function attributes.
Optional fields (input params, routine definition, comment, properties, …) are
left unset and can be added with the with_* methods.
Sourcepub fn with_input_params(
self,
input_params: impl Into<Option<FunctionParameterInfos>>,
) -> Self
pub fn with_input_params( self, input_params: impl Into<Option<FunctionParameterInfos>>, ) -> Self
Set the array of function parameter infos.
Sourcepub fn with_properties<I, K, V>(self, properties: I) -> Self
pub fn with_properties<I, K, V>(self, properties: I) -> Self
Set the key-value properties attached to the securable.
Trait Implementations§
Source§impl Clone for CreateFunction
impl Clone for CreateFunction
Source§fn clone(&self) -> CreateFunction
fn clone(&self) -> CreateFunction
1.0.0 (const: unstable) · 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 Default for CreateFunction
impl Default for CreateFunction
Source§fn default() -> CreateFunction
fn default() -> CreateFunction
Source§impl DefaultInstance for CreateFunction
impl DefaultInstance for CreateFunction
Source§fn default_instance() -> &'static Self
fn default_instance() -> &'static Self
Source§impl<'de> Deserialize<'de> for CreateFunctionwhere
CreateFunction: Default,
impl<'de> Deserialize<'de> for CreateFunctionwhere
CreateFunction: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl ExtensionSet for CreateFunction
impl ExtensionSet for CreateFunction
Source§const PROTO_FQN: &'static str = "unitycatalog.functions.v1.CreateFunction"
const PROTO_FQN: &'static str = "unitycatalog.functions.v1.CreateFunction"
"google.protobuf.FieldOptions". Read moreSource§fn unknown_fields(&self) -> &UnknownFields
fn unknown_fields(&self) -> &UnknownFields
Source§fn unknown_fields_mut(&mut self) -> &mut UnknownFields
fn unknown_fields_mut(&mut self) -> &mut UnknownFields
Source§fn extension<C>(&self, ext: &Extension<C>) -> <C as ExtensionCodec>::Outputwhere
C: ExtensionCodec,
fn extension<C>(&self, ext: &Extension<C>) -> <C as ExtensionCodec>::Outputwhere
C: ExtensionCodec,
Source§fn set_extension<C>(
&mut self,
ext: &Extension<C>,
value: <C as ExtensionCodec>::Value,
)where
C: ExtensionCodec,
fn set_extension<C>(
&mut self,
ext: &Extension<C>,
value: <C as ExtensionCodec>::Value,
)where
C: ExtensionCodec,
Source§fn has_extension<C>(&self, ext: &Extension<C>) -> boolwhere
C: ExtensionCodec,
fn has_extension<C>(&self, ext: &Extension<C>) -> boolwhere
C: ExtensionCodec,
true if any record at the extension’s field number is present. Read moreSource§fn clear_extension<C>(&mut self, ext: &Extension<C>)where
C: ExtensionCodec,
fn clear_extension<C>(&mut self, ext: &Extension<C>)where
C: ExtensionCodec,
Source§fn extension_or_default<C>(
&self,
ext: &Extension<C>,
) -> <C as ExtensionCodec>::Valuewhere
C: ExtensionCodec<Output = Option<<C as ExtensionCodec>::Value>>,
<C as ExtensionCodec>::Value: Default,
fn extension_or_default<C>(
&self,
ext: &Extension<C>,
) -> <C as ExtensionCodec>::Valuewhere
C: ExtensionCodec<Output = Option<<C as ExtensionCodec>::Value>>,
<C as ExtensionCodec>::Value: Default,
[default = ...]
value if absent, or the type’s Default if no proto default was declared. Read moreSource§impl HasMessageView for CreateFunction
impl HasMessageView for CreateFunction
Source§type View<'a> = CreateFunctionView<'a>
type View<'a> = CreateFunctionView<'a>
Self, borrowing from a buffer with lifetime
'a.Source§type ViewHandle = CreateFunctionOwnedView
type ViewHandle = CreateFunctionOwnedView
'static owned-view handle for Self
(FooOwnedView).Source§fn decode_view_handle(bytes: Bytes) -> Result<Self::ViewHandle, DecodeError>
fn decode_view_handle(bytes: Bytes) -> Result<Self::ViewHandle, DecodeError>
Source§fn decode_view_handle_with_options(
bytes: Bytes,
opts: &DecodeOptions,
) -> Result<Self::ViewHandle, DecodeError>
fn decode_view_handle_with_options( bytes: Bytes, opts: &DecodeOptions, ) -> Result<Self::ViewHandle, DecodeError>
Source§impl Message for CreateFunction
impl Message for CreateFunction
Source§fn compute_size(&self, __cache: &mut SizeCache) -> u32
fn compute_size(&self, __cache: &mut SizeCache) -> u32
Returns the total encoded size in bytes.
The result is a u32; the protobuf specification requires all
messages to fit within 2 GiB (2,147,483,647 bytes), so a
compliant message will never overflow this type.
Source§fn write_to(&self, __cache: &mut SizeCache, buf: &mut impl BufMut)
fn write_to(&self, __cache: &mut SizeCache, buf: &mut impl BufMut)
cache (populated by a prior
compute_size call on the same cache). Read moreSource§fn merge_field(
&mut self,
tag: Tag,
buf: &mut impl Buf,
depth: u32,
) -> Result<(), DecodeError>
fn merge_field( &mut self, tag: Tag, buf: &mut impl Buf, depth: u32, ) -> Result<(), DecodeError>
buf. Read moreSource§fn encode(&self, buf: &mut impl BufMut)
fn encode(&self, buf: &mut impl BufMut)
Source§fn encode_with_cache(&self, cache: &mut SizeCache, buf: &mut impl BufMut)
fn encode_with_cache(&self, cache: &mut SizeCache, buf: &mut impl BufMut)
SizeCache, for
reuse across many encodes in a hot loop. Clears the cache first.Source§fn encoded_len(&self) -> u32
fn encoded_len(&self) -> u32
Source§fn encode_length_delimited(&self, buf: &mut impl BufMut)
fn encode_length_delimited(&self, buf: &mut impl BufMut)
Source§fn encode_to_bytes(&self) -> Bytes
fn encode_to_bytes(&self) -> Bytes
bytes::Bytes. Read moreSource§fn decode(buf: &mut impl Buf) -> Result<Self, DecodeError>where
Self: Sized,
fn decode(buf: &mut impl Buf) -> Result<Self, DecodeError>where
Self: Sized,
Source§fn decode_from_slice(data: &[u8]) -> Result<Self, DecodeError>where
Self: Sized,
fn decode_from_slice(data: &[u8]) -> Result<Self, DecodeError>where
Self: Sized,
Source§fn decode_length_delimited(buf: &mut impl Buf) -> Result<Self, DecodeError>where
Self: Sized,
fn decode_length_delimited(buf: &mut impl Buf) -> Result<Self, DecodeError>where
Self: Sized,
Source§fn merge_to_limit(
&mut self,
buf: &mut impl Buf,
depth: u32,
limit: usize,
) -> Result<(), DecodeError>
fn merge_to_limit( &mut self, buf: &mut impl Buf, depth: u32, limit: usize, ) -> Result<(), DecodeError>
Source§fn merge_group(
&mut self,
buf: &mut impl Buf,
depth: u32,
field_number: u32,
) -> Result<(), DecodeError>
fn merge_group( &mut self, buf: &mut impl Buf, depth: u32, field_number: u32, ) -> Result<(), DecodeError>
buf, reading fields until an
EndGroup tag with the given field_number is encountered. Read moreSource§fn merge(&mut self, buf: &mut impl Buf, depth: u32) -> Result<(), DecodeError>
fn merge(&mut self, buf: &mut impl Buf, depth: u32) -> Result<(), DecodeError>
Source§fn merge_from_slice(&mut self, data: &[u8]) -> Result<(), DecodeError>
fn merge_from_slice(&mut self, data: &[u8]) -> Result<(), DecodeError>
Source§fn merge_length_delimited(
&mut self,
buf: &mut impl Buf,
depth: u32,
) -> Result<(), DecodeError>
fn merge_length_delimited( &mut self, buf: &mut impl Buf, depth: u32, ) -> Result<(), DecodeError>
Source§impl MessageName for CreateFunction
impl MessageName for CreateFunction
Source§const PACKAGE: &'static str = "unitycatalog.functions.v1"
const PACKAGE: &'static str = "unitycatalog.functions.v1"
Source§const NAME: &'static str = "CreateFunction"
const NAME: &'static str = "CreateFunction"
. between nesting levels. Read more