Class: Google::Apis::ConnectorsV2::Query
- Inherits:
-
Object
- Object
- Google::Apis::ConnectorsV2::Query
- 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
-
#max_rows ⇒ Fixnum
Sets the limit for the maximum number of rows returned after the query execution.
-
#query ⇒ String
Required.
-
#query_parameters ⇒ Array<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.
-
#timeout ⇒ Fixnum
Sets the number of seconds the driver will wait for a query to execute.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Query
constructor
A new instance of Query.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Query
Returns a new instance of Query.
1259 1260 1261 |
# File 'lib/google/apis/connectors_v2/classes.rb', line 1259 def initialize(**args) update!(**args) end |
Instance Attribute Details
#max_rows ⇒ Fixnum
Sets the limit for the maximum number of rows returned after the query
execution.
Corresponds to the JSON property maxRows
1241 1242 1243 |
# File 'lib/google/apis/connectors_v2/classes.rb', line 1241 def max_rows @max_rows end |
#query ⇒ String
Required. Sql query to execute.
Corresponds to the JSON property query
1246 1247 1248 |
# File 'lib/google/apis/connectors_v2/classes.rb', line 1246 def query @query end |
#query_parameters ⇒ Array<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
1252 1253 1254 |
# File 'lib/google/apis/connectors_v2/classes.rb', line 1252 def query_parameters @query_parameters end |
#timeout ⇒ Fixnum
Sets the number of seconds the driver will wait for a query to execute.
Corresponds to the JSON property timeout
1257 1258 1259 |
# File 'lib/google/apis/connectors_v2/classes.rb', line 1257 def timeout @timeout end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1264 1265 1266 1267 1268 1269 |
# File 'lib/google/apis/connectors_v2/classes.rb', line 1264 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 |