com.google.api.services.spanner.v1.model.ResultSetMetadata Maven / Gradle / Ivy
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.spanner.v1.model;
/**
* Metadata about a ResultSet or PartialResultSet.
*
* This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Cloud Spanner API. For a detailed explanation see:
* https://developers.google.com/api-client-library/java/google-http-java-client/json
*
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class ResultSetMetadata extends com.google.api.client.json.GenericJson {
/**
* Indicates the field names and types for the rows in the result set. For example, a SQL query
* like `"SELECT UserId, UserName FROM Users"` could return a `row_type` value like: "fields": [ {
* "name": "UserId", "type": { "code": "INT64" } }, { "name": "UserName", "type": { "code":
* "STRING" } }, ]
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private StructType rowType;
/**
* If the read or SQL query began a transaction as a side-effect, the information about the new
* transaction is yielded here.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Transaction transaction;
/**
* A SQL query can be parameterized. In PLAN mode, these parameters can be undeclared. This
* indicates the field names and types for those undeclared parameters in the SQL query. For
* example, a SQL query like `"SELECT * FROM Users where UserId = @userId and UserName = @userName
* "` could return a `undeclared_parameters` value like: "fields": [ { "name": "UserId", "type": {
* "code": "INT64" } }, { "name": "UserName", "type": { "code": "STRING" } }, ]
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private StructType undeclaredParameters;
/**
* Indicates the field names and types for the rows in the result set. For example, a SQL query
* like `"SELECT UserId, UserName FROM Users"` could return a `row_type` value like: "fields": [ {
* "name": "UserId", "type": { "code": "INT64" } }, { "name": "UserName", "type": { "code":
* "STRING" } }, ]
* @return value or {@code null} for none
*/
public StructType getRowType() {
return rowType;
}
/**
* Indicates the field names and types for the rows in the result set. For example, a SQL query
* like `"SELECT UserId, UserName FROM Users"` could return a `row_type` value like: "fields": [ {
* "name": "UserId", "type": { "code": "INT64" } }, { "name": "UserName", "type": { "code":
* "STRING" } }, ]
* @param rowType rowType or {@code null} for none
*/
public ResultSetMetadata setRowType(StructType rowType) {
this.rowType = rowType;
return this;
}
/**
* If the read or SQL query began a transaction as a side-effect, the information about the new
* transaction is yielded here.
* @return value or {@code null} for none
*/
public Transaction getTransaction() {
return transaction;
}
/**
* If the read or SQL query began a transaction as a side-effect, the information about the new
* transaction is yielded here.
* @param transaction transaction or {@code null} for none
*/
public ResultSetMetadata setTransaction(Transaction transaction) {
this.transaction = transaction;
return this;
}
/**
* A SQL query can be parameterized. In PLAN mode, these parameters can be undeclared. This
* indicates the field names and types for those undeclared parameters in the SQL query. For
* example, a SQL query like `"SELECT * FROM Users where UserId = @userId and UserName = @userName
* "` could return a `undeclared_parameters` value like: "fields": [ { "name": "UserId", "type": {
* "code": "INT64" } }, { "name": "UserName", "type": { "code": "STRING" } }, ]
* @return value or {@code null} for none
*/
public StructType getUndeclaredParameters() {
return undeclaredParameters;
}
/**
* A SQL query can be parameterized. In PLAN mode, these parameters can be undeclared. This
* indicates the field names and types for those undeclared parameters in the SQL query. For
* example, a SQL query like `"SELECT * FROM Users where UserId = @userId and UserName = @userName
* "` could return a `undeclared_parameters` value like: "fields": [ { "name": "UserId", "type": {
* "code": "INT64" } }, { "name": "UserName", "type": { "code": "STRING" } }, ]
* @param undeclaredParameters undeclaredParameters or {@code null} for none
*/
public ResultSetMetadata setUndeclaredParameters(StructType undeclaredParameters) {
this.undeclaredParameters = undeclaredParameters;
return this;
}
@Override
public ResultSetMetadata set(String fieldName, Object value) {
return (ResultSetMetadata) super.set(fieldName, value);
}
@Override
public ResultSetMetadata clone() {
return (ResultSetMetadata) super.clone();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy