@SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 5: return internalGetParamTypes(); default: throw new RuntimeException("Invalid map field number: " + number); } }
public int getParamTypesCount() { return internalGetParamTypes().getMap().size(); } /**
/** * * * <pre> * 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][google.spanner.v1.ExecuteSqlRequest.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][google.spanner.v1.Type] for more information * about SQL types. * </pre> * * <code>map<string, .google.spanner.v1.Type> param_types = 5;</code> */ public java.util.Map<java.lang.String, com.google.spanner.v1.Type> getParamTypesMap() { return internalGetParamTypes().getMap(); } /**
/** * * * <pre> * 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][google.spanner.v1.ExecuteSqlRequest.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][google.spanner.v1.Type] for more information * about SQL types. * </pre> * * <code>map<string, .google.spanner.v1.Type> param_types = 5;</code> */ public boolean containsParamTypes(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetParamTypes().getMap().containsKey(key); } /** Use {@link #getParamTypesMap()} instead. */
/** * * * <pre> * 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][google.spanner.v1.ExecuteSqlRequest.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][google.spanner.v1.Type] for more information * about SQL types. * </pre> * * <code>map<string, .google.spanner.v1.Type> param_types = 5;</code> */ public com.google.spanner.v1.Type getParamTypesOrDefault( java.lang.String key, com.google.spanner.v1.Type defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map<java.lang.String, com.google.spanner.v1.Type> map = internalGetParamTypes().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /**
/** * * * <pre> * 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][google.spanner.v1.ExecuteSqlRequest.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][google.spanner.v1.Type] for more information * about SQL types. * </pre> * * <code>map<string, .google.spanner.v1.Type> param_types = 5;</code> */ public com.google.spanner.v1.Type getParamTypesOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map<java.lang.String, com.google.spanner.v1.Type> map = internalGetParamTypes().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getSessionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, session_); } if (transaction_ != null) { output.writeMessage(2, getTransaction()); } if (!getSqlBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sql_); } if (params_ != null) { output.writeMessage(4, getParams()); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetParamTypes(), ParamTypesDefaultEntryHolder.defaultEntry, 5); if (!resumeToken_.isEmpty()) { output.writeBytes(6, resumeToken_); } if (queryMode_ != com.google.spanner.v1.ExecuteSqlRequest.QueryMode.NORMAL.getNumber()) { output.writeEnum(7, queryMode_); } if (!partitionToken_.isEmpty()) { output.writeBytes(8, partitionToken_); } if (seqno_ != 0L) { output.writeInt64(9, seqno_); } unknownFields.writeTo(output); }
internalGetParamTypes().getMap().entrySet()) { com.google.protobuf.MapEntry<java.lang.String, com.google.spanner.v1.Type> paramTypes__ = ParamTypesDefaultEntryHolder.defaultEntry
hash = (53 * hash) + getParams().hashCode(); if (!internalGetParamTypes().getMap().isEmpty()) { hash = (37 * hash) + PARAM_TYPES_FIELD_NUMBER; hash = (53 * hash) + internalGetParamTypes().hashCode();
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.spanner.v1.ExecuteSqlRequest)) { return super.equals(obj); } com.google.spanner.v1.ExecuteSqlRequest other = (com.google.spanner.v1.ExecuteSqlRequest) obj; boolean result = true; result = result && getSession().equals(other.getSession()); result = result && (hasTransaction() == other.hasTransaction()); if (hasTransaction()) { result = result && getTransaction().equals(other.getTransaction()); } result = result && getSql().equals(other.getSql()); result = result && (hasParams() == other.hasParams()); if (hasParams()) { result = result && getParams().equals(other.getParams()); } result = result && internalGetParamTypes().equals(other.internalGetParamTypes()); result = result && getResumeToken().equals(other.getResumeToken()); result = result && queryMode_ == other.queryMode_; result = result && getPartitionToken().equals(other.getPartitionToken()); result = result && (getSeqno() == other.getSeqno()); result = result && unknownFields.equals(other.unknownFields); return result; }