Class: Google::Apis::BigqueryV2::Routine
- Inherits:
-
Object
- Object
- Google::Apis::BigqueryV2::Routine
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/bigquery_v2/classes.rb,
generated/google/apis/bigquery_v2/representations.rb,
generated/google/apis/bigquery_v2/representations.rb
Overview
A user-defined function or a stored procedure.
Instance Attribute Summary collapse
-
#arguments ⇒ Array<Google::Apis::BigqueryV2::Argument>
Optional.
-
#creation_time ⇒ Fixnum
Output only.
-
#definition_body ⇒ String
Required.
-
#etag ⇒ String
Output only.
-
#imported_libraries ⇒ Array<String>
Optional.
-
#language ⇒ String
Optional.
-
#last_modified_time ⇒ Fixnum
Output only.
-
#return_type ⇒ Google::Apis::BigqueryV2::StandardSqlDataType
The type of a variable, e.g., a function argument.
-
#routine_reference ⇒ Google::Apis::BigqueryV2::RoutineReference
Required.
-
#routine_type ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Routine
constructor
A new instance of Routine.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Routine
Returns a new instance of Routine
4199 4200 4201 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 4199 def initialize(**args) update!(**args) end |
Instance Attribute Details
#arguments ⇒ Array<Google::Apis::BigqueryV2::Argument>
Optional.
Corresponds to the JSON property arguments
4128 4129 4130 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 4128 def arguments @arguments end |
#creation_time ⇒ Fixnum
Output only. The time when this routine was created, in milliseconds since
the epoch.
Corresponds to the JSON property creationTime
4134 4135 4136 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 4134 def creation_time @creation_time end |
#definition_body ⇒ String
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))
definition_body = r'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'
definition_body = 'return "\n";\n' (both \n are replaced with
linebreaks).
Corresponds to the JSON property definitionBody
4151 4152 4153 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 4151 def definition_body @definition_body end |
#etag ⇒ String
Output only. A hash of this resource.
Corresponds to the JSON property etag
4156 4157 4158 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 4156 def etag @etag end |
#imported_libraries ⇒ Array<String>
Optional. If language = "JAVASCRIPT", this field stores the path of the
imported JAVASCRIPT libraries.
Corresponds to the JSON property importedLibraries
4162 4163 4164 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 4162 def imported_libraries @imported_libraries end |
#language ⇒ String
Optional. Defaults to "SQL".
Corresponds to the JSON property language
4167 4168 4169 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 4167 def language @language end |
#last_modified_time ⇒ Fixnum
Output only. The time when this routine was last modified, in milliseconds
since the epoch.
Corresponds to the JSON property lastModifiedTime
4173 4174 4175 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 4173 def last_modified_time @last_modified_time end |
#return_type ⇒ Google::Apis::BigqueryV2::StandardSqlDataType
The type of a variable, e.g., a function argument.
Examples:
INT64: type_kind="INT64"
ARRAYtype_kind="ARRAY", array_element_type="STRING"
STRUCTtype_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 propertyreturnType`
4187 4188 4189 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 4187 def return_type @return_type end |
#routine_reference ⇒ Google::Apis::BigqueryV2::RoutineReference
Required. Reference describing the ID of this routine.
Corresponds to the JSON property routineReference
4192 4193 4194 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 4192 def routine_reference @routine_reference end |
#routine_type ⇒ String
Required.
Corresponds to the JSON property routineType
4197 4198 4199 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 4197 def routine_type @routine_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 |
# File 'generated/google/apis/bigquery_v2/classes.rb', line 4204 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) @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_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) end |