本文整理了Java中com.baidu.hugegraph.backend.query.Query.orders
方法的一些代码示例,展示了Query.orders
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.orders
方法的具体详情如下:
包路径:com.baidu.hugegraph.backend.query.Query
类名称:Query
方法名:orders
暂无
代码示例来源:origin: hugegraph/hugegraph
protected void wrapOrderBy(StringBuilder select, Query query) {
int size = query.orders().size();
assert size > 0;
int i = 0;
// Set order-by
select.append(" ORDER BY ");
for (Map.Entry<HugeKeys, Query.Order> order :
query.orders().entrySet()) {
String key = formatKey(order.getKey());
Query.Order value = order.getValue();
select.append(key).append(" ");
if (value == Query.Order.ASC) {
select.append("ASC");
} else {
assert value == Query.Order.DESC;
select.append("DESC");
}
if (++i != size) {
select.append(", ");
}
}
}
代码示例来源:origin: hugegraph/hugegraph
if (!query.orders().isEmpty()) {
this.wrapOrderBy(selection, query);
代码示例来源:origin: hugegraph/hugegraph
public default <Q extends Query> Q injectQueryInfo(Q query) {
query.orders(this.queryInfo().orders());
query.offset(this.queryInfo().offset());
query.limit(this.queryInfo().limit());
query.page(this.queryInfo().page());
query.capacity(this.queryInfo().capacity());
return query;
}
}
代码示例来源:origin: hugegraph/hugegraph
for (Map.Entry<HugeKeys, Order> order : query.orders().entrySet()) {
String name = formatKey(order.getKey());
if (order.getValue() == Order.ASC) {
代码示例来源:origin: com.baidu.hugegraph/hugegraph-mysql
protected void wrapOrderBy(StringBuilder select, Query query) {
int size = query.orders().size();
assert size > 0;
int i = 0;
// Set order-by
select.append(" ORDER BY ");
for (Map.Entry<HugeKeys, Query.Order> order :
query.orders().entrySet()) {
String key = formatKey(order.getKey());
Query.Order value = order.getValue();
select.append(key).append(" ");
if (value == Query.Order.ASC) {
select.append("ASC");
} else {
assert value == Query.Order.DESC;
select.append("DESC");
}
if (++i != size) {
select.append(", ");
}
}
}
代码示例来源:origin: com.baidu.hugegraph/hugegraph-mysql
if (!query.orders().isEmpty()) {
this.wrapOrderBy(selection, query);
代码示例来源:origin: com.baidu.hugegraph/hugegraph-core
public default <Q extends Query> Q injectQueryInfo(Q query) {
query.orders(this.queryInfo().orders());
query.offset(this.queryInfo().offset());
query.limit(this.queryInfo().limit());
query.page(this.queryInfo().page());
query.capacity(this.queryInfo().capacity());
return query;
}
}
代码示例来源:origin: com.baidu.hugegraph/hugegraph-cassandra
for (Map.Entry<HugeKeys, Order> order : query.orders().entrySet()) {
String name = formatKey(order.getKey());
if (order.getValue() == Order.ASC) {
内容来源于网络,如有侵权,请联系作者删除!