Class: Google::Apis::ConnectorsV2::Query

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/connectors_v2/classes.rb,
lib/google/apis/connectors_v2/representations.rb,
lib/google/apis/connectors_v2/representations.rb

Overview

A wrapper around the SQL query statement. This is needed so that the JSON representation of ExecuteSqlQueryRequest has the following format: "query":" select *".

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Query

Returns a new instance of Query.



1973
1974
1975
# File 'lib/google/apis/connectors_v2/classes.rb', line 1973

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#max_rowsFixnum

Sets the limit for the maximum number of rows returned after the query execution. Corresponds to the JSON property maxRows

Returns:

  • (Fixnum)


1955
1956
1957
# File 'lib/google/apis/connectors_v2/classes.rb', line 1955

def max_rows
  @max_rows
end

#queryString

Required. Sql query to execute. Corresponds to the JSON property query

Returns:

  • (String)


1960
1961
1962
# File 'lib/google/apis/connectors_v2/classes.rb', line 1960

def query
  @query
end

#query_parametersArray<Google::Apis::ConnectorsV2::QueryParameter>

In the struct, the value corresponds to the value of query parameter and date type corresponds to the date type of the query parameter. Corresponds to the JSON property queryParameters



1966
1967
1968
# File 'lib/google/apis/connectors_v2/classes.rb', line 1966

def query_parameters
  @query_parameters
end

#timeoutFixnum

Sets the number of seconds the driver will wait for a query to execute. Corresponds to the JSON property timeout

Returns:

  • (Fixnum)


1971
1972
1973
# File 'lib/google/apis/connectors_v2/classes.rb', line 1971

def timeout
  @timeout
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1978
1979
1980
1981
1982
1983
# File 'lib/google/apis/connectors_v2/classes.rb', line 1978

def update!(**args)
  @max_rows = args[:max_rows] if args.key?(:max_rows)
  @query = args[:query] if args.key?(:query)
  @query_parameters = args[:query_parameters] if args.key?(:query_parameters)
  @timeout = args[:timeout] if args.key?(:timeout)
end