本文整理了Java中com.google.datastore.v1.Query.getLimit
方法的一些代码示例,展示了Query.getLimit
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getLimit
方法的具体详情如下:
包路径:com.google.datastore.v1.Query
类名称:Query
方法名:getLimit
[英]```
The maximum number of results to return. Applies after all other
constraints. Optional.
Unspecified is interpreted as no limit.
Must be >= 0 if specified.
`.google.protobuf.Int32Value limit = 12;`
[中]```
The maximum number of results to return. Applies after all other
constraints. Optional.
Unspecified is interpreted as no limit.
Must be >= 0 if specified.
.google.protobuf.Int32Value limit = 12;
代码示例来源:origin: googleapis/google-cloud-java
/**
*
*
* <pre>
* The maximum number of results to return. Applies after all other
* constraints. Optional.
* Unspecified is interpreted as no limit.
* Must be >= 0 if specified.
* </pre>
*
* <code>.google.protobuf.Int32Value limit = 12;</code>
*/
public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() {
return getLimit();
}
代码示例来源:origin: googleapis/google-cloud-java
output.writeMessage(12, getLimit());
代码示例来源:origin: googleapis/google-cloud-java
size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getLimit());
代码示例来源:origin: googleapis/google-cloud-java
mergeLimit(other.getLimit());
代码示例来源:origin: googleapis/google-cloud-java
if (hasLimit()) {
hash = (37 * hash) + LIMIT_FIELD_NUMBER;
hash = (53 * hash) + getLimit().hashCode();
代码示例来源:origin: googleapis/google-cloud-java
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.datastore.v1.Query)) {
return super.equals(obj);
}
com.google.datastore.v1.Query other = (com.google.datastore.v1.Query) obj;
boolean result = true;
result = result && getProjectionList().equals(other.getProjectionList());
result = result && getKindList().equals(other.getKindList());
result = result && (hasFilter() == other.hasFilter());
if (hasFilter()) {
result = result && getFilter().equals(other.getFilter());
}
result = result && getOrderList().equals(other.getOrderList());
result = result && getDistinctOnList().equals(other.getDistinctOnList());
result = result && getStartCursor().equals(other.getStartCursor());
result = result && getEndCursor().equals(other.getEndCursor());
result = result && (getOffset() == other.getOffset());
result = result && (hasLimit() == other.hasLimit());
if (hasLimit()) {
result = result && getLimit().equals(other.getLimit());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
代码示例来源:origin: googleapis/google-cloud-java
setLimit(queryPb.getLimit().getValue());
代码示例来源:origin: com.google.cloud.datastore/datastore-v1-protos
/**
* <pre>
* The maximum number of results to return. Applies after all other
* constraints. Optional.
* Unspecified is interpreted as no limit.
* Must be >= 0 if specified.
* </pre>
*
* <code>optional .google.protobuf.Int32Value limit = 12;</code>
*/
public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() {
return getLimit();
}
代码示例来源:origin: com.google.api.grpc/proto-google-cloud-datastore-v1
/**
*
*
* <pre>
* The maximum number of results to return. Applies after all other
* constraints. Optional.
* Unspecified is interpreted as no limit.
* Must be >= 0 if specified.
* </pre>
*
* <code>.google.protobuf.Int32Value limit = 12;</code>
*/
public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() {
return getLimit();
}
代码示例来源:origin: com.google.api.grpc/proto-google-cloud-datastore-v1
size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getLimit());
代码示例来源:origin: com.google.api.grpc/proto-google-cloud-datastore-v1
output.writeMessage(12, getLimit());
代码示例来源:origin: com.google.cloud.datastore/datastore-v1-protos
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < projection_.size(); i++) {
output.writeMessage(2, projection_.get(i));
}
for (int i = 0; i < kind_.size(); i++) {
output.writeMessage(3, kind_.get(i));
}
if (filter_ != null) {
output.writeMessage(4, getFilter());
}
for (int i = 0; i < order_.size(); i++) {
output.writeMessage(5, order_.get(i));
}
for (int i = 0; i < distinctOn_.size(); i++) {
output.writeMessage(6, distinctOn_.get(i));
}
if (!startCursor_.isEmpty()) {
output.writeBytes(7, startCursor_);
}
if (!endCursor_.isEmpty()) {
output.writeBytes(8, endCursor_);
}
if (offset_ != 0) {
output.writeInt32(10, offset_);
}
if (limit_ != null) {
output.writeMessage(12, getLimit());
}
}
代码示例来源:origin: com.google.cloud.datastore/datastore-v1-protos
.computeMessageSize(12, getLimit());
代码示例来源:origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform
/**
* Returns a new {@link DatastoreV1.Read} that reads the results of the specified query.
*
* <p><b>Note:</b> Normally, {@code DatastoreIO} will read from Cloud Datastore in parallel
* across many workers. However, when the {@link Query} is configured with a limit using {@link
* Query.Builder#setLimit}, then all results will be read by a single worker in order to ensure
* correct results.
*/
public DatastoreV1.Read withQuery(Query query) {
checkArgument(query != null, "query can not be null");
checkArgument(
!query.hasLimit() || query.getLimit().getValue() > 0,
"Invalid query limit %s: must be positive",
query.getLimit().getValue());
return toBuilder().setQuery(query).build();
}
代码示例来源:origin: com.google.cloud.datastore/datastore-v1-protos
if (hasLimit()) {
hash = (37 * hash) + LIMIT_FIELD_NUMBER;
hash = (53 * hash) + getLimit().hashCode();
代码示例来源:origin: com.google.api.grpc/proto-google-cloud-datastore-v1
if (hasLimit()) {
hash = (37 * hash) + LIMIT_FIELD_NUMBER;
hash = (53 * hash) + getLimit().hashCode();
代码示例来源:origin: com.google.api.grpc/proto-google-cloud-datastore-v1
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.datastore.v1.Query)) {
return super.equals(obj);
}
com.google.datastore.v1.Query other = (com.google.datastore.v1.Query) obj;
boolean result = true;
result = result && getProjectionList().equals(other.getProjectionList());
result = result && getKindList().equals(other.getKindList());
result = result && (hasFilter() == other.hasFilter());
if (hasFilter()) {
result = result && getFilter().equals(other.getFilter());
}
result = result && getOrderList().equals(other.getOrderList());
result = result && getDistinctOnList().equals(other.getDistinctOnList());
result = result && getStartCursor().equals(other.getStartCursor());
result = result && getEndCursor().equals(other.getEndCursor());
result = result && (getOffset() == other.getOffset());
result = result && (hasLimit() == other.hasLimit());
if (hasLimit()) {
result = result && getLimit().equals(other.getLimit());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
代码示例来源:origin: com.google.cloud.datastore/datastore-v1-protos
result = result && (hasLimit() == other.hasLimit());
if (hasLimit()) {
result = result && getLimit()
.equals(other.getLimit());
代码示例来源:origin: com.google.cloud/google-cloud-datastore
setLimit(queryPb.getLimit().getValue());
代码示例来源:origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform
int limit = q.getLimit().getValue();
assertThat(limit, greaterThanOrEqualTo(1));
assertThat(limit, lessThanOrEqualTo(QUERY_BATCH_LIMIT));
内容来源于网络,如有侵权,请联系作者删除!