本文整理了Java中org.intermine.objectstore.query.Query.getIqlQuery
方法的一些代码示例,展示了Query.getIqlQuery
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getIqlQuery
方法的具体详情如下:
包路径:org.intermine.objectstore.query.Query
类名称:Query
方法名:getIqlQuery
[英]Returns an IqlQuery object representing this query, that may have been cached.
[中]返回表示此查询的IqlQuery对象,该对象可能已被缓存。
代码示例来源:origin: intermine/intermine
/**
* Returns a string representation of this Query object
*
* @return a String representation
*/
@Override
public String toString() {
return getIqlQuery().toString();
}
代码示例来源:origin: org.intermine/intermine-objectstore
/**
* Returns a string representation of this Query object
*
* @return a String representation
*/
@Override
public String toString() {
return getIqlQuery().toString();
}
代码示例来源:origin: intermine/intermine
queryString = q.getIqlQuery().getQueryString();
if ((bag != null) && (bag.size() >= getMinBagTableSize())) {
if (queryString == null) {
queryString = q.getIqlQuery().getQueryString();
代码示例来源:origin: org.intermine/intermine-objectstore
queryString = q.getIqlQuery().getQueryString();
if ((bag != null) && (bag.size() >= getMinBagTableSize())) {
if (queryString == null) {
queryString = q.getIqlQuery().getQueryString();
代码示例来源:origin: intermine/intermine
public void executeTest(String type) throws Exception {
Object res = results.get(type);
if (res instanceof IqlQuery) {
IqlQuery fq = (IqlQuery) res;
Query parsed = IqlQueryParser.parse(fq);
if ("SubQuery".equals(type) || type.equals("OrderByAnomaly")) {
// These two queries CANNOT be generated properly by IQL (as they contain 5 in the SELECT list).
// Therefore, we must merely check that they are regenerated back into IQL.
IqlQuery fqNew = parsed.getIqlQuery();
assertEquals(type + " has failed", fq, fqNew);
} else {
assertEquals(type + " has failed", (Query) queries.get(type), parsed);
}
} else {
Iterator resIter = ((Collection) res).iterator();
while (resIter.hasNext()) {
IqlQuery fq = (IqlQuery) resIter.next();
Query parsed = IqlQueryParser.parse(fq);
assertEquals(type + " has failed: " + fq.toString(), (Query) queries.get(type), parsed);
}
}
}
代码示例来源:origin: intermine/intermine
private static void checkToString(String msg, Query q1, Query q2) {
IqlQuery fq1 = q1.getIqlQuery();
IqlQuery fq2 = q2.getIqlQuery();
Assert.assertEquals(msg, fq1.getQueryString(), fq2.getQueryString());
Assert.assertEquals(msg, fq1.getParameters(), fq2.getParameters());
}
代码示例来源:origin: intermine/intermine
public void executeTest(String type) throws Exception {
Query orig = ((Query) queries.get(type));
Object res = results.get(type);
IqlQuery fqGenerated = orig.getIqlQuery();
if (res instanceof IqlQuery) {
IqlQuery fq = (IqlQuery) res;
// This is testing whether new IqlQuery(Query) gives the IqlQueries above
assertEquals(type + " has failed: " + fqGenerated.getQueryString(), fq.getQueryString(), fqGenerated.getQueryString());
assertEquals(type + " has failed: " + fq.getParameters().getClass().getName() + " versus " + fqGenerated.getParameters().getClass().getName(), fq.getParameters(), fqGenerated.getParameters());
} else {
Iterator resIter = ((Collection) res).iterator();
boolean passed = false;
while (resIter.hasNext()) {
IqlQuery fq = (IqlQuery) resIter.next();
passed = passed || ((fq.getQueryString().equals(fqGenerated.getQueryString())) && (fq.getParameters().equals(fqGenerated.getParameters())));
}
assertTrue(type + " has failed: " + fqGenerated.toString(), passed);
}
}
代码示例来源:origin: org.intermine/intermine-objectstore
statsConTime += conTime;
if (getVerboseQueryLog()) {
SQLLOGGER.info("(VERBOSE) iql: " + q.getIqlQuery().toStringTruncateParameters(20)
+ "\n"
+ "generated sql: " + generatedSql + "\n"
代码示例来源:origin: intermine/intermine
statsConTime += conTime;
if (getVerboseQueryLog()) {
SQLLOGGER.info("(VERBOSE) iql: " + q.getIqlQuery().toStringTruncateParameters(20)
+ "\n"
+ "generated sql: " + generatedSql + "\n"
代码示例来源:origin: intermine/intermine
IqlQuery subquery = c.getQuery().getIqlQuery();
return retval.toString();
} else if (cc instanceof SubqueryExistsConstraint) {
IqlQuery subquery = ((SubqueryExistsConstraint) cc).getQuery().getIqlQuery();
parameters.addAll(subquery.getParameters());
return (cc.getOp().equals(ConstraintOp.EXISTS) ? "EXISTS (" : "DOES NOT EXIST (")
代码示例来源:origin: org.intermine/intermine-objectstore
IqlQuery subquery = c.getQuery().getIqlQuery();
return retval.toString();
} else if (cc instanceof SubqueryExistsConstraint) {
IqlQuery subquery = ((SubqueryExistsConstraint) cc).getQuery().getIqlQuery();
parameters.addAll(subquery.getParameters());
return (cc.getOp().equals(ConstraintOp.EXISTS) ? "EXISTS (" : "DOES NOT EXIST (")
内容来源于网络,如有侵权,请联系作者删除!