/** * * * <pre> * If the read or SQL query began a transaction as a side-effect, the * information about the new transaction is yielded here. * </pre> * * <code>.google.spanner.v1.Transaction transaction = 2;</code> */ public com.google.spanner.v1.TransactionOrBuilder getTransactionOrBuilder() { return getTransaction(); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (rowType_ != null) { output.writeMessage(1, getRowType()); } if (transaction_ != null) { output.writeMessage(2, getTransaction()); } unknownFields.writeTo(output); }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (rowType_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRowType()); } if (transaction_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTransaction()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasRowType()) { hash = (37 * hash) + ROW_TYPE_FIELD_NUMBER; hash = (53 * hash) + getRowType().hashCode(); } if (hasTransaction()) { hash = (37 * hash) + TRANSACTION_FIELD_NUMBER; hash = (53 * hash) + getTransaction().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.spanner.v1.ResultSetMetadata)) { return super.equals(obj); } com.google.spanner.v1.ResultSetMetadata other = (com.google.spanner.v1.ResultSetMetadata) obj; boolean result = true; result = result && (hasRowType() == other.hasRowType()); if (hasRowType()) { result = result && getRowType().equals(other.getRowType()); } result = result && (hasTransaction() == other.hasTransaction()); if (hasTransaction()) { result = result && getTransaction().equals(other.getTransaction()); } result = result && unknownFields.equals(other.unknownFields); return result; }
@Override public boolean next() throws SpannerException { if (error != null) { throw newSpannerException(error); } try { if (currRow == null) { ResultSetMetadata metadata = iterator.getMetadata(); if (metadata.hasTransaction()) { listener.onTransactionMetadata(metadata.getTransaction()); } currRow = new GrpcStruct(iterator.type(), new ArrayList<>()); } boolean hasNext = currRow.consumeRow(iterator); if (!hasNext) { statistics = iterator.getStats(); } return hasNext; } catch (SpannerException e) { throw yieldError(e); } }
public Builder mergeFrom(com.google.spanner.v1.ResultSetMetadata other) { if (other == com.google.spanner.v1.ResultSetMetadata.getDefaultInstance()) return this; if (other.hasRowType()) { mergeRowType(other.getRowType()); } if (other.hasTransaction()) { mergeTransaction(other.getTransaction()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@Override public boolean next() throws SpannerException { if (error != null) { throw newSpannerException(error); } try { if (currRow == null) { ResultSetMetadata metadata = iterator.getMetadata(); if (metadata.hasTransaction()) { listener.onTransactionMetadata(metadata.getTransaction()); } currRow = new GrpcStruct(iterator.type(), new ArrayList<>()); } boolean hasNext = currRow.consumeRow(iterator); if (!hasNext) { statistics = iterator.getStats(); } return hasNext; } catch (SpannerException e) { throw yieldError(e); } }