class Google::Apis::BigqueryV2::Routine

A user-defined function or a stored procedure.

Attributes

arguments[RW]

Optional. Corresponds to the JSON property `arguments` @return [Array<Google::Apis::BigqueryV2::Argument>]

creation_time[RW]

Output only. The time when this routine was created, in milliseconds since the epoch. Corresponds to the JSON property `creationTime` @return [Fixnum]

definition_body[RW]

Required. 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 is `concat(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 is `return “n”;n` Note that both n are replaced with linebreaks. Corresponds to the JSON property `definitionBody` @return [String]

description[RW]

Optional. The description of the routine, if defined. Corresponds to the JSON property `description` @return [String]

determinism_level[RW]

Optional. The determinism level of the JavaScript UDF, if defined. Corresponds to the JSON property `determinismLevel` @return [String]

etag[RW]

Output only. A hash of this resource. Corresponds to the JSON property `etag` @return [String]

imported_libraries[RW]

Optional. If language = “JAVASCRIPT”, this field stores the path of the imported JAVASCRIPT libraries. Corresponds to the JSON property `importedLibraries` @return [Array<String>]

language[RW]

Optional. Defaults to “SQL”. Corresponds to the JSON property `language` @return [String]

last_modified_time[RW]

Output only. The time when this routine was last modified, in milliseconds since the epoch. Corresponds to the JSON property `lastModifiedTime` @return [Fixnum]

return_table_type[RW]

A table type Corresponds to the JSON property `returnTableType` @return [Google::Apis::BigqueryV2::StandardSqlTableType]

return_type[RW]

The type of a variable, e.g., a function argument. Examples: INT64: `type_kind= “INT64”` ARRAY: `type_kind=“ARRAY”, array_element_type=“STRING”` STRUCT>: ` type_kind=“STRUCT”, struct_type=`fields=[ `name=“x”, type=`type_kind=“STRING”“ , `name=“y”, type=`type_kind=“ARRAY”, array_element_type=“DATE”“ ]“ Corresponds to the JSON property `returnType` @return [Google::Apis::BigqueryV2::StandardSqlDataType]

routine_reference[RW]

Required. Reference describing the ID of this routine. Corresponds to the JSON property `routineReference` @return [Google::Apis::BigqueryV2::RoutineReference]

routine_type[RW]

Required. The type of routine. Corresponds to the JSON property `routineType` @return [String]

strict_mode[RW]

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. Corresponds to the JSON property `strictMode` @return [Boolean]

strict_mode?[RW]

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. Corresponds to the JSON property `strictMode` @return [Boolean]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/bigquery_v2/classes.rb, line 5665
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/bigquery_v2/classes.rb, line 5670
def update!(**args)
  @arguments = args[:arguments] if args.key?(:arguments)
  @creation_time = args[:creation_time] if args.key?(:creation_time)
  @definition_body = args[:definition_body] if args.key?(:definition_body)
  @description = args[:description] if args.key?(:description)
  @determinism_level = args[:determinism_level] if args.key?(:determinism_level)
  @etag = args[:etag] if args.key?(:etag)
  @imported_libraries = args[:imported_libraries] if args.key?(:imported_libraries)
  @language = args[:language] if args.key?(:language)
  @last_modified_time = args[:last_modified_time] if args.key?(:last_modified_time)
  @return_table_type = args[:return_table_type] if args.key?(:return_table_type)
  @return_type = args[:return_type] if args.key?(:return_type)
  @routine_reference = args[:routine_reference] if args.key?(:routine_reference)
  @routine_type = args[:routine_type] if args.key?(:routine_type)
  @strict_mode = args[:strict_mode] if args.key?(:strict_mode)
end