/** * * * <pre> * The transaction to use. If none is provided, the default is a * temporary read-only transaction with strong concurrency. * The transaction to use. * For queries, if none is provided, the default is a temporary read-only * transaction with strong concurrency. * Standard DML statements require a ReadWrite transaction. Single-use * transactions are not supported (to avoid replay). The caller must * either supply an existing transaction ID or begin a new transaction. * Partitioned DML requires an existing PartitionedDml transaction ID. * </pre> * * <code>.google.spanner.v1.TransactionSelector transaction = 2;</code> */ public com.google.spanner.v1.TransactionSelectorOrBuilder getTransactionOrBuilder() { return getTransaction(); }
@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); }
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTransaction());
if (hasTransaction()) { hash = (37 * hash) + TRANSACTION_FIELD_NUMBER; hash = (53 * hash) + getTransaction().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; }
mergeTransaction(other.getTransaction());