Class: Google::Apis::BigqueryV2::Routine
- Inherits:
-
Object
- Object
- Google::Apis::BigqueryV2::Routine
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/bigquery_v2/classes.rb,
lib/google/apis/bigquery_v2/representations.rb,
lib/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.
-
#description ⇒ String
Optional.
-
#determinism_level ⇒ String
Optional.
-
#etag ⇒ String
Output only.
-
#imported_libraries ⇒ Array<String>
Optional.
-
#language ⇒ String
Optional.
-
#last_modified_time ⇒ Fixnum
Output only.
-
#remote_function_options ⇒ Google::Apis::BigqueryV2::RemoteFunctionOptions
Options for a remote user-defined function.
-
#return_table_type ⇒ Google::Apis::BigqueryV2::StandardSqlTableType
A table type Corresponds to the JSON property
returnTableType. -
#return_type ⇒ Google::Apis::BigqueryV2::StandardSqlDataType
The data type of a variable such as a function argument.
-
#routine_reference ⇒ Google::Apis::BigqueryV2::RoutineReference
Required.
-
#routine_type ⇒ String
Required.
-
#strict_mode ⇒ Boolean
(also: #strict_mode?)
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Routine
constructor
A new instance of Routine.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Routine
Returns a new instance of Routine.
6401 6402 6403 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6401 def initialize(**args) update!(**args) end |
Instance Attribute Details
#arguments ⇒ Array<Google::Apis::BigqueryV2::Argument>
Optional.
Corresponds to the JSON property arguments
6307 6308 6309 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6307 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
6313 6314 6315 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6313 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)) 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
6327 6328 6329 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6327 def definition_body @definition_body end |
#description ⇒ String
Optional. The description of the routine, if defined.
Corresponds to the JSON property description
6332 6333 6334 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6332 def description @description end |
#determinism_level ⇒ String
Optional. The determinism level of the JavaScript UDF, if defined.
Corresponds to the JSON property determinismLevel
6337 6338 6339 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6337 def determinism_level @determinism_level end |
#etag ⇒ String
Output only. A hash of this resource.
Corresponds to the JSON property etag
6342 6343 6344 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6342 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
6348 6349 6350 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6348 def imported_libraries @imported_libraries end |
#language ⇒ String
Optional. Defaults to "SQL".
Corresponds to the JSON property language
6353 6354 6355 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6353 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
6359 6360 6361 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6359 def last_modified_time @last_modified_time end |
#remote_function_options ⇒ Google::Apis::BigqueryV2::RemoteFunctionOptions
Options for a remote user-defined function.
Corresponds to the JSON property remoteFunctionOptions
6364 6365 6366 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6364 def @remote_function_options end |
#return_table_type ⇒ Google::Apis::BigqueryV2::StandardSqlTableType
A table type
Corresponds to the JSON property returnTableType
6369 6370 6371 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6369 def return_table_type @return_table_type end |
#return_type ⇒ Google::Apis::BigqueryV2::StandardSqlDataType
The data type of a variable such as a function argument. Examples include: *
INT64: "typeKind": "INT64" * ARRAY: "typeKind": "ARRAY", "
arrayElementType":"typeKind": "STRING" * STRUCT>: "typeKind": "STRUCT",
"structType": "fields": [ "name": "x", "type":"typeKind: "STRING", "
name": "y", "type": "typeKind": "ARRAY", "arrayElementType": "typekind": "
DATE" ]
Corresponds to the JSON property returnType
6379 6380 6381 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6379 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
6384 6385 6386 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6384 def routine_reference @routine_reference end |
#routine_type ⇒ String
Required. The type of routine.
Corresponds to the JSON property routineType
6389 6390 6391 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6389 def routine_type @routine_type end |
#strict_mode ⇒ Boolean Also known as: strict_mode?
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
6398 6399 6400 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6398 def strict_mode @strict_mode end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6406 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) @remote_function_options = args[:remote_function_options] if args.key?(:remote_function_options) @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 |