本文整理汇总了Java中com.orientechnologies.orient.core.sql.OSQLEngine类的典型用法代码示例。如果您正苦于以下问题:Java OSQLEngine类的具体用法?Java OSQLEngine怎么用?Java OSQLEngine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OSQLEngine类属于com.orientechnologies.orient.core.sql包,在下文中一共展示了OSQLEngine类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerCustomFunctions
import com.orientechnologies.orient.core.sql.OSQLEngine; //导入依赖的package包/类
private void registerCustomFunctions(final Iterable<OSQLFunctionAbstract> functions) {
log.debug("Registering custom OrientDB functions");
for (OSQLFunctionAbstract function : functions) {
log.debug("Registering OrientDB function " + function.getName());
OSQLEngine.getInstance().registerFunction(function.getName(), function);
}
}
示例2: evaluateRecord
import com.orientechnologies.orient.core.sql.OSQLEngine; //导入依赖的package包/类
@Override
public Object evaluateRecord(OIdentifiable iRecord, ODocument iCurrentResult, OSQLFilterCondition iCondition, Object iLeft,
Object iRight, OCommandContext iContext) {
OSQLFunction function = OSQLEngine.getInstance().getFunction(keyword);
return function.execute(this, iRecord, iCurrentResult, new Object[] { iLeft, iCondition.getRight() }, iContext);
}
示例3: registerGraphFunctions
import com.orientechnologies.orient.core.sql.OSQLEngine; //导入依赖的package包/类
private static void registerGraphFunctions() {
OGraphFunctionFactory graphFunctions = new OGraphFunctionFactory();
Set<String> names = graphFunctions.getFunctionNames();
for (String name : names) {
System.out.println("Enabling ODB graph function: [" + name + "]");
OSQLEngine.getInstance().registerFunction(name, graphFunctions.createFunction(name));
OSQLFunction function = OSQLEngine.getInstance().getFunction(name);
if (function != null) {
// Dummy call, just to ensure that the class is loaded
function.getSyntax();
}
}
}
示例4: startup
import com.orientechnologies.orient.core.sql.OSQLEngine; //导入依赖的package包/类
@Override
public void startup() {
super.startup();
Orient.instance().addDbLifecycleListener(this);
OIndexes.registerFactory(new OLuceneIndexFactory(true));
OSQLEngine.registerOperator(new OLuceneTextOperator());
OSQLEngine.registerOperator(new OLuceneWithinOperator());
OSQLEngine.registerOperator(new OLuceneNearOperator());
OLogManager.instance().info(this, "Lucene index plugin installed and active. Lucene version: %s",
OLuceneIndexManagerAbstract.LUCENE_VERSION);
}
示例5: registerOperators
import com.orientechnologies.orient.core.sql.OSQLEngine; //导入依赖的package包/类
protected void registerOperators() {
for (OQueryOperator operator : OLuceneSpatialOperatorFactory.OPERATORS) {
OSQLEngine.registerOperator(operator);
}
}
示例6: registerFunctions
import com.orientechnologies.orient.core.sql.OSQLEngine; //导入依赖的package包/类
protected void registerFunctions() {
for (String s : OSpatialFunctionsFactory.FUNCTIONS.keySet()) {
OSQLEngine.getInstance().registerFunction(s, (OSQLFunction) OSpatialFunctionsFactory.FUNCTIONS.get(s));
}
}