bigquery  v2
Public Member Functions | Static Public Member Functions | List of all members
google_bigquery_api::Routine Class Reference

#include <routine.h>

Inheritance diagram for google_bigquery_api::Routine:

Public Member Functions

 Routine (const Json::Value &storage)
 
 Routine (Json::Value *storage)
 
virtual ~Routine ()
 
const StringPiece GetTypeName () const
 
bool has_arguments () const
 
void clear_arguments ()
 
const client::JsonCppArray< Argumentget_arguments () const
 
client::JsonCppArray< Argumentmutable_arguments ()
 
bool has_creation_time () const
 
void clear_creation_time ()
 
int64 get_creation_time () const
 
void set_creation_time (int64 value)
 
bool has_definition_body () const
 
void clear_definition_body ()
 
const StringPiece get_definition_body () const
 
void set_definition_body (const StringPiece &value)
 
bool has_description () const
 
void clear_description ()
 
const StringPiece get_description () const
 
void set_description (const StringPiece &value)
 
bool has_etag () const
 
void clear_etag ()
 
const StringPiece get_etag () const
 
void set_etag (const StringPiece &value)
 
bool has_imported_libraries () const
 
void clear_imported_libraries ()
 
const client::JsonCppArray< string > get_imported_libraries () const
 
client::JsonCppArray< string > mutable_importedLibraries ()
 
bool has_language () const
 
void clear_language ()
 
const StringPiece get_language () const
 
void set_language (const StringPiece &value)
 
bool has_last_modified_time () const
 
void clear_last_modified_time ()
 
int64 get_last_modified_time () const
 
void set_last_modified_time (int64 value)
 
bool has_return_type () const
 
void clear_return_type ()
 
const StandardSqlDataType get_return_type () const
 
StandardSqlDataType mutable_returnType ()
 
bool has_routine_reference () const
 
void clear_routine_reference ()
 
const RoutineReference get_routine_reference () const
 
RoutineReference mutable_routineReference ()
 
bool has_routine_type () const
 
void clear_routine_type ()
 
const StringPiece get_routine_type () const
 
void set_routine_type (const StringPiece &value)
 

Static Public Member Functions

static RoutineNew ()
 

Detailed Description

A user-defined function or a stored procedure.

Constructor & Destructor Documentation

◆ Routine() [1/2]

google_bigquery_api::Routine::Routine ( const Json::Value &  storage)
explicit

Standard constructor for an immutable data object instance.

Parameters
[in]storageThe underlying data storage for this instance.

◆ Routine() [2/2]

google_bigquery_api::Routine::Routine ( Json::Value *  storage)
explicit

Standard constructor for a mutable data object instance.

Parameters
[in]storageThe underlying data storage for this instance.

◆ ~Routine()

google_bigquery_api::Routine::~Routine ( )
virtual

Standard destructor.

Member Function Documentation

◆ clear_arguments()

void google_bigquery_api::Routine::clear_arguments ( )
inline

Clears the 'arguments' attribute.

◆ clear_creation_time()

void google_bigquery_api::Routine::clear_creation_time ( )
inline

Clears the 'creationTime' attribute.

◆ clear_definition_body()

void google_bigquery_api::Routine::clear_definition_body ( )
inline

Clears the 'definitionBody' attribute.

◆ clear_description()

void google_bigquery_api::Routine::clear_description ( )
inline

Clears the 'description' attribute.

◆ clear_etag()

void google_bigquery_api::Routine::clear_etag ( )
inline

Clears the 'etag' attribute.

◆ clear_imported_libraries()

void google_bigquery_api::Routine::clear_imported_libraries ( )
inline

Clears the 'importedLibraries' attribute.

◆ clear_language()

void google_bigquery_api::Routine::clear_language ( )
inline

Clears the 'language' attribute.

◆ clear_last_modified_time()

void google_bigquery_api::Routine::clear_last_modified_time ( )
inline

Clears the 'lastModifiedTime' attribute.

◆ clear_return_type()

void google_bigquery_api::Routine::clear_return_type ( )
inline

Clears the 'returnType' attribute.

◆ clear_routine_reference()

void google_bigquery_api::Routine::clear_routine_reference ( )
inline

Clears the 'routineReference' attribute.

◆ clear_routine_type()

void google_bigquery_api::Routine::clear_routine_type ( )
inline

Clears the 'routineType' attribute.

◆ get_arguments()

const client::JsonCppArray<Argument > google_bigquery_api::Routine::get_arguments ( ) const

Get a reference to the value of the 'arguments' attribute.

◆ get_creation_time()

int64 google_bigquery_api::Routine::get_creation_time ( ) const
inline

Get the value of the 'creationTime' attribute.

◆ get_definition_body()

const StringPiece google_bigquery_api::Routine::get_definition_body ( ) const
inline

Get the value of the 'definitionBody' attribute.

◆ get_description()

const StringPiece google_bigquery_api::Routine::get_description ( ) const
inline

Get the value of the 'description' attribute.

◆ get_etag()

const StringPiece google_bigquery_api::Routine::get_etag ( ) const
inline

Get the value of the 'etag' attribute.

◆ get_imported_libraries()

const client::JsonCppArray<string > google_bigquery_api::Routine::get_imported_libraries ( ) const
inline

Get a reference to the value of the 'importedLibraries' attribute.

◆ get_language()

const StringPiece google_bigquery_api::Routine::get_language ( ) const
inline

Get the value of the 'language' attribute.

◆ get_last_modified_time()

int64 google_bigquery_api::Routine::get_last_modified_time ( ) const
inline

Get the value of the 'lastModifiedTime' attribute.

◆ get_return_type()

const StandardSqlDataType google_bigquery_api::Routine::get_return_type ( ) const

Get a reference to the value of the 'returnType' attribute.

◆ get_routine_reference()

const RoutineReference google_bigquery_api::Routine::get_routine_reference ( ) const

Get a reference to the value of the 'routineReference' attribute.

◆ get_routine_type()

const StringPiece google_bigquery_api::Routine::get_routine_type ( ) const
inline

Get the value of the 'routineType' attribute.

◆ GetTypeName()

const StringPiece google_bigquery_api::Routine::GetTypeName ( ) const
inline

Returns a string denoting the type of this data object.

Returns
google_bigquery_api::Routine

◆ has_arguments()

bool google_bigquery_api::Routine::has_arguments ( ) const
inline

Determine if the 'arguments' attribute was set.

Returns
true if the 'arguments' attribute was set.

◆ has_creation_time()

bool google_bigquery_api::Routine::has_creation_time ( ) const
inline

Determine if the 'creationTime' attribute was set.

Returns
true if the 'creationTime' attribute was set.

◆ has_definition_body()

bool google_bigquery_api::Routine::has_definition_body ( ) const
inline

Determine if the 'definitionBody' attribute was set.

Returns
true if the 'definitionBody' attribute was set.

◆ has_description()

bool google_bigquery_api::Routine::has_description ( ) const
inline

Determine if the 'description' attribute was set.

Returns
true if the 'description' attribute was set.

◆ has_etag()

bool google_bigquery_api::Routine::has_etag ( ) const
inline

Determine if the 'etag' attribute was set.

Returns
true if the 'etag' attribute was set.

◆ has_imported_libraries()

bool google_bigquery_api::Routine::has_imported_libraries ( ) const
inline

Determine if the 'importedLibraries' attribute was set.

Returns
true if the 'importedLibraries' attribute was set.

◆ has_language()

bool google_bigquery_api::Routine::has_language ( ) const
inline

Determine if the 'language' attribute was set.

Returns
true if the 'language' attribute was set.

◆ has_last_modified_time()

bool google_bigquery_api::Routine::has_last_modified_time ( ) const
inline

Determine if the 'lastModifiedTime' attribute was set.

Returns
true if the 'lastModifiedTime' attribute was set.

◆ has_return_type()

bool google_bigquery_api::Routine::has_return_type ( ) const
inline

Determine if the 'returnType' attribute was set.

Returns
true if the 'returnType' attribute was set.

◆ has_routine_reference()

bool google_bigquery_api::Routine::has_routine_reference ( ) const
inline

Determine if the 'routineReference' attribute was set.

Returns
true if the 'routineReference' attribute was set.

◆ has_routine_type()

bool google_bigquery_api::Routine::has_routine_type ( ) const
inline

Determine if the 'routineType' attribute was set.

Returns
true if the 'routineType' attribute was set.

◆ mutable_arguments()

client::JsonCppArray<Argument > google_bigquery_api::Routine::mutable_arguments ( )

Gets a reference to a mutable value of the 'arguments' property.

Optional.

Returns
The result can be modified to change the attribute value.

◆ mutable_importedLibraries()

client::JsonCppArray<string > google_bigquery_api::Routine::mutable_importedLibraries ( )
inline

Gets a reference to a mutable value of the 'importedLibraries' property.

Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.

Returns
The result can be modified to change the attribute value.

◆ mutable_returnType()

StandardSqlDataType google_bigquery_api::Routine::mutable_returnType ( )

Gets a reference to a mutable value of the 'returnType' property.

Optional if language = "SQL"; required otherwise.

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"} for Add and Decrement, and is absent for Increment (inferred as FLOAT64 at query time).

Suppose the function Add is replaced by CREATE OR REPLACE FUNCTION Add(x INT64, y INT64) AS (x + y);

Then the inferred return type of Increment is automatically changed to INT64 at query time, while the return type of Decrement remains FLOAT64.

Returns
The result can be modified to change the attribute value.

◆ mutable_routineReference()

RoutineReference google_bigquery_api::Routine::mutable_routineReference ( )

Gets a reference to a mutable value of the 'routineReference' property.

Required. Reference describing the ID of this routine.

Returns
The result can be modified to change the attribute value.

◆ New()

Routine * google_bigquery_api::Routine::New ( )
static

Creates a new default instance.

Returns
Ownership is passed back to the caller.

◆ set_creation_time()

void google_bigquery_api::Routine::set_creation_time ( int64  value)
inline

Change the 'creationTime' attribute.

Output only. The time when this routine was created, in milliseconds since the epoch.

Parameters
[in]valueThe new value.

◆ set_definition_body()

void google_bigquery_api::Routine::set_definition_body ( const StringPiece &  value)
inline

Change the 'definitionBody' attribute.

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) (
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
are replaced with linebreaks.

Parameters
[in]valueThe new value.

◆ set_description()

void google_bigquery_api::Routine::set_description ( const StringPiece &  value)
inline

Change the 'description' attribute.

Optional. [Experimental] The description of the routine if defined.

Parameters
[in]valueThe new value.

◆ set_etag()

void google_bigquery_api::Routine::set_etag ( const StringPiece &  value)
inline

Change the 'etag' attribute.

Output only. A hash of this resource.

Parameters
[in]valueThe new value.

◆ set_language()

void google_bigquery_api::Routine::set_language ( const StringPiece &  value)
inline

Change the 'language' attribute.

Optional. Defaults to "SQL".

Parameters
[in]valueThe new value.

◆ set_last_modified_time()

void google_bigquery_api::Routine::set_last_modified_time ( int64  value)
inline

Change the 'lastModifiedTime' attribute.

Output only. The time when this routine was last modified, in milliseconds since the epoch.

Parameters
[in]valueThe new value.

◆ set_routine_type()

void google_bigquery_api::Routine::set_routine_type ( const StringPiece &  value)
inline

Change the 'routineType' attribute.

Required. The type of routine.

Parameters
[in]valueThe new value.

The documentation for this class was generated from the following files: