@SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 5: return internalGetParamTypes(); default: throw new RuntimeException("Invalid map field number: " + number); } }
/** * * * <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); }
/** * * * <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; } /**
@java.lang.Override public com.google.spanner.v1.ExecuteSqlRequest buildPartial() { com.google.spanner.v1.ExecuteSqlRequest result = new com.google.spanner.v1.ExecuteSqlRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.session_ = session_; if (transactionBuilder_ == null) { result.transaction_ = transaction_; } else { result.transaction_ = transactionBuilder_.build(); } result.sql_ = sql_; if (paramsBuilder_ == null) { result.params_ = params_; } else { result.params_ = paramsBuilder_.build(); } result.paramTypes_ = internalGetParamTypes(); result.paramTypes_.makeImmutable(); result.resumeToken_ = resumeToken_; result.queryMode_ = queryMode_; result.partitionToken_ = partitionToken_; result.seqno_ = seqno_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
/** * * * <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 java.util.Map<java.lang.String, com.google.spanner.v1.Type> getParamTypesMap() { return internalGetParamTypes().getMap(); } /**
public int getParamTypesCount() { return internalGetParamTypes().getMap().size(); } /**