本文整理了Java中org.apache.metamodel.query.Query.selectDistinct
方法的一些代码示例,展示了Query.selectDistinct
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.selectDistinct
方法的具体详情如下:
包路径:org.apache.metamodel.query.Query
类名称:Query
方法名:selectDistinct
暂无
代码示例来源:origin: org.eobjects.analyzerbeans/AnalyzerBeans-core
@Override
public Collection<String> getValues() {
try (final DatastoreConnection con = _datastore.openConnection()) {
final DataContext dataContext = con.getDataContext();
final Query q = dataContext.query().from(_column.getTable()).select(_column).toQuery();
q.selectDistinct();
try (final DataSet dataSet = dataContext.executeQuery(q)) {
final List<String> values = new ArrayList<String>();
while (dataSet.next()) {
final Row row = dataSet.getRow();
Object value = row.getValue(0);
if (value != null) {
value = value.toString();
}
values.add((String) value);
}
return values;
}
}
}
}
代码示例来源:origin: org.apache.metamodel/MetaModel-core
query.selectDistinct();
selectClause = selectClause.substring("DISTINCT ".length());
代码示例来源:origin: apache/metamodel
query.selectDistinct();
selectClause = selectClause.substring("DISTINCT ".length());
内容来源于网络,如有侵权,请联系作者删除!