All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.services.spanner.v1.model.Statement Maven / Gradle / Ivy

There is a newer version: v1-rev20241020-2.0.0
Show newest version
/*
 * 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;

/**
 * A single DML statement.
 *
 * 

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 Statement extends com.google.api.client.json.GenericJson { /** * It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value. For * example, values of type `BYTES` and values of type `STRING` both appear in params as JSON * strings. In these cases, `param_types` can be used to specify the exact SQL type for some or * all of the SQL statement parameters. See the definition of Type for more information about SQL * types. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.Map paramTypes; /** * Parameter names and values that bind to placeholders in the DML string. A parameter placeholder * consists of the `@` character followed by the parameter name (for example, `@firstName`). * Parameter names can contain letters, numbers, and underscores. Parameters can appear anywhere * that a literal value is expected. The same parameter name can be used more than once, for * example: `"WHERE id > @msg_id AND id < @msg_id + 100"` It is an error to execute a SQL * statement with unbound parameters. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.Map params; /** * Required. The DML string. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String sql; /** * It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value. For * example, values of type `BYTES` and values of type `STRING` both appear in params as JSON * strings. In these cases, `param_types` can be used to specify the exact SQL type for some or * all of the SQL statement parameters. See the definition of Type for more information about SQL * types. * @return value or {@code null} for none */ public java.util.Map getParamTypes() { return paramTypes; } /** * It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value. For * example, values of type `BYTES` and values of type `STRING` both appear in params as JSON * strings. In these cases, `param_types` can be used to specify the exact SQL type for some or * all of the SQL statement parameters. See the definition of Type for more information about SQL * types. * @param paramTypes paramTypes or {@code null} for none */ public Statement setParamTypes(java.util.Map paramTypes) { this.paramTypes = paramTypes; return this; } /** * Parameter names and values that bind to placeholders in the DML string. A parameter placeholder * consists of the `@` character followed by the parameter name (for example, `@firstName`). * Parameter names can contain letters, numbers, and underscores. Parameters can appear anywhere * that a literal value is expected. The same parameter name can be used more than once, for * example: `"WHERE id > @msg_id AND id < @msg_id + 100"` It is an error to execute a SQL * statement with unbound parameters. * @return value or {@code null} for none */ public java.util.Map getParams() { return params; } /** * Parameter names and values that bind to placeholders in the DML string. A parameter placeholder * consists of the `@` character followed by the parameter name (for example, `@firstName`). * Parameter names can contain letters, numbers, and underscores. Parameters can appear anywhere * that a literal value is expected. The same parameter name can be used more than once, for * example: `"WHERE id > @msg_id AND id < @msg_id + 100"` It is an error to execute a SQL * statement with unbound parameters. * @param params params or {@code null} for none */ public Statement setParams(java.util.Map params) { this.params = params; return this; } /** * Required. The DML string. * @return value or {@code null} for none */ public java.lang.String getSql() { return sql; } /** * Required. The DML string. * @param sql sql or {@code null} for none */ public Statement setSql(java.lang.String sql) { this.sql = sql; return this; } @Override public Statement set(String fieldName, Object value) { return (Statement) super.set(fieldName, value); } @Override public Statement clone() { return (Statement) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy