本文整理汇总了Java中com.orientechnologies.orient.core.sql.OCommandSQLParsingException类的典型用法代码示例。如果您正苦于以下问题:Java OCommandSQLParsingException类的具体用法?Java OCommandSQLParsingException怎么用?Java OCommandSQLParsingException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OCommandSQLParsingException类属于com.orientechnologies.orient.core.sql包,在下文中一共展示了OCommandSQLParsingException类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: executeQuery
import com.orientechnologies.orient.core.sql.OCommandSQLParsingException; //导入依赖的package包/类
public IResultSet executeQuery() throws OdaException
{
String currentQueryText = queryText;
if(getMaxRows()!=0){
currentQueryText = currentQueryText+ " LIMIT "+getMaxRows();
}
try {
OSQLSynchQuery<ODocument> query = new OSQLSynchQuery<ODocument>(currentQueryText);
List<ODocument> dbResult = getOrMakeDBResult(db.command(query).execute(parameters));
/*
ArrayList<ODocument> unCachedResult = new ArrayList<ODocument>(dbResult.size());
for (ODocument oDocument : dbResult) {
ODocument newDoc = new ODocument();
for (Entry<String, Object> entry : oDocument) {
newDoc.field(entry.getKey(),entry.getValue());
}
unCachedResult.add(newDoc);
}*/
return new ResultSet(dbResult,curMetaData);
} catch (OCommandSQLParsingException e) {
throw new OdaException(e);
}
}
示例2: validate
import com.orientechnologies.orient.core.sql.OCommandSQLParsingException; //导入依赖的package包/类
@Override
public List<String> validate(String derivationlogic) {
OCommandSQL cmd = new OCommandSQL(derivationlogic);
try {
new OCommandExecutorSQLSelect().parse(cmd);
} catch (OCommandSQLParsingException ex) {
return Collections.singletonList(ex.toString());
}
return Collections.emptyList();
}