RoutineArgs class
The set of arguments for Routine. The set of arguments for Routine.
Constructors
-
RoutineArgs({Input<
List< ? arguments, Input<Argument> >RoutineDataGovernanceType> ? dataGovernanceType, required Input<String> datasetId, required Input<String> definitionBody, Input<String> ? description, Input<RoutineDeterminismLevel> ? determinismLevel, Input<List< ? importedLibraries, Input<String> >RoutineLanguage> ? language, Input<String> ? project, Input<RemoteFunctionOptions> ? remoteFunctionOptions, Input<StandardSqlTableType> ? returnTableType, Input<StandardSqlDataType> ? returnType, required Input<RoutineReference> routineReference, required Input<RoutineRoutineType> routineType, Input<RoutineSecurityMode> ? securityMode, Input<SparkOptions> ? sparkOptions, Input<bool> ? strictMode}) -
Creates a new RoutineArgs.
argumentsOptional.dataGovernanceTypeOptional. If set toDATA_MASKING, the function is validated and made available as a masking function. For more information, see Create custom masking routines.datasetIdRequired.definitionBodyThe body of the routine. For functions, this is the expression in the AS clause. If language=SQL, it is the substring inside (but excluding) the parentheses. For example, for the function created with the following statement:CREATE FUNCTION JoinLines(x string, y string) as (concat(x, "\n", y))The definition_body isconcat(x, "\n", y)(\n is not replaced with linebreak). If language=JAVASCRIPT, it is the evaluated string in the AS clause. For example, for the function created with the following statement:CREATE FUNCTION f() RETURNS STRING LANGUAGE js AS 'return "\n";\n'The definition_body isreturn "\n";\nNote that both \n are replaced with linebreaks.descriptionOptional. The description of the routine, if defined.determinismLevelOptional. The determinism level of the JavaScript UDF, if defined.importedLibrariesOptional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.languageOptional. Defaults to "SQL" if remote_function_options field is absent, not set otherwise.projectOptional.remoteFunctionOptionsOptional. Remote function specific options.returnTableTypeOptional. Can be set only if routine_type = "TABLE_VALUED_FUNCTION". If absent, the return table type is inferred from definition_body at query time in each query that references this routine. If present, then the columns in the evaluated table result will be cast to match the column types specified in return table type, at query time.returnTypeOptional if language = "SQL"; required otherwise. Cannot be set if routine_type = "TABLE_VALUED_FUNCTION". If absent, the return type is inferred from definition_body at query time in each query that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time. For example, for the functions created with the following statements: *CREATE FUNCTION Add(x FLOAT64, y FLOAT64) RETURNS FLOAT64 AS (x + y);*CREATE FUNCTION Increment(x FLOAT64) AS (Add(x, 1));*CREATE FUNCTION Decrement(x FLOAT64) RETURNS FLOAT64 AS (Add(x, -1));The return_type is{type_kind: "FLOAT64"}forAddandDecrement, and is absent forIncrement(inferred as FLOAT64 at query time). Suppose the functionAddis replaced byCREATE OR REPLACE FUNCTION Add(x INT64, y INT64) AS (x + y);Then the inferred return type ofIncrementis automatically changed to INT64 at query time, while the return type ofDecrementremains FLOAT64.routineReferenceReference describing the ID of this routine.routineTypeThe type of routine.securityModeOptional. The security mode of the routine, if defined. If not defined, the security mode is automatically determined from the routine's configuration.sparkOptionsOptional. Spark specific options.strictModeOptional. Can be set for procedures only. If true (default), the definition body will be validated in the creation and the updates of the procedure. For procedures with an argument of ANY TYPE, the definition body validtion is not supported at creation/update time, and thus this field must be set to false explicitly.const -
RoutineArgs.fromMap(Map<
String, dynamic> map) -
factory
Properties
-
arguments
→ Input<
List< ?Argument> > -
Optional.
final
-
dataGovernanceType
→ Input<
RoutineDataGovernanceType> ? -
Optional. If set to
DATA_MASKING, the function is validated and made available as a masking function. For more information, see Create custom masking routines.final -
datasetId
→ Input<
String> -
final
-
definitionBody
→ Input<
String> -
The body of the routine. For functions, this is the expression in the AS clause. If language=SQL, it is the substring inside (but excluding) the parentheses. For example, for the function created with the following statement:
CREATE FUNCTION JoinLines(x string, y string) as (concat(x, "\n", y))The definition_body isconcat(x, "\n", y)(\n is not replaced with linebreak). If language=JAVASCRIPT, it is the evaluated string in the AS clause. For example, for the function created with the following statement:CREATE FUNCTION f() RETURNS STRING LANGUAGE js AS 'return "\n";\n'The definition_body isreturn "\n";\nNote that both \n are replaced with linebreaks.final -
description
→ Input<
String> ? -
Optional. The description of the routine, if defined.
final
-
determinismLevel
→ Input<
RoutineDeterminismLevel> ? -
Optional. The determinism level of the JavaScript UDF, if defined.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
importedLibraries
→ Input<
List< ?String> > -
Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.
final
-
language
→ Input<
RoutineLanguage> ? -
Optional. Defaults to "SQL" if remote_function_options field is absent, not set otherwise.
final
-
project
→ Input<
String> ? -
final
-
remoteFunctionOptions
→ Input<
RemoteFunctionOptions> ? -
Optional. Remote function specific options.
final
-
returnTableType
→ Input<
StandardSqlTableType> ? -
Optional. Can be set only if routine_type = "TABLE_VALUED_FUNCTION". If absent, the return table type is inferred from definition_body at query time in each query that references this routine. If present, then the columns in the evaluated table result will be cast to match the column types specified in return table type, at query time.
final
-
returnType
→ Input<
StandardSqlDataType> ? -
Optional if language = "SQL"; required otherwise. Cannot be set if routine_type = "TABLE_VALUED_FUNCTION". If absent, the return type is inferred from definition_body at query time in each query that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time. For example, for the functions created with the following statements: *
CREATE FUNCTION Add(x FLOAT64, y FLOAT64) RETURNS FLOAT64 AS (x + y);*CREATE FUNCTION Increment(x FLOAT64) AS (Add(x, 1));*CREATE FUNCTION Decrement(x FLOAT64) RETURNS FLOAT64 AS (Add(x, -1));The return_type is{type_kind: "FLOAT64"}forAddandDecrement, and is absent forIncrement(inferred as FLOAT64 at query time). Suppose the functionAddis replaced byCREATE OR REPLACE FUNCTION Add(x INT64, y INT64) AS (x + y);Then the inferred return type ofIncrementis automatically changed to INT64 at query time, while the return type ofDecrementremains FLOAT64.final -
routineReference
→ Input<
RoutineReference> -
Reference describing the ID of this routine.
final
-
routineType
→ Input<
RoutineRoutineType> -
The type of routine.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
securityMode
→ Input<
RoutineSecurityMode> ? -
Optional. The security mode of the routine, if defined. If not defined, the security mode is automatically determined from the routine's configuration.
final
-
sparkOptions
→ Input<
SparkOptions> ? -
Optional. Spark specific options.
final
-
strictMode
→ Input<
bool> ? -
Optional. Can be set for procedures only. If true (default), the definition body will be validated in the creation and the updates of the procedure. For procedures with an argument of ANY TYPE, the definition body validtion is not supported at creation/update time, and thus this field must be set to false explicitly.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited