public OSQLFunction getFunction(String iFunctionName) { iFunctionName = iFunctionName.toLowerCase(Locale.ENGLISH); if (iFunctionName.equalsIgnoreCase("any") || iFunctionName.equalsIgnoreCase("all")) // SPECIAL FUNCTIONS return null; final Iterator<OSQLFunctionFactory> ite = getFunctionFactories(); while (ite.hasNext()) { final OSQLFunctionFactory factory = ite.next(); if (factory.hasFunction(iFunctionName)) { return factory.createFunction(iFunctionName); } } throw new OCommandSQLParsingException( "No function with name '" + iFunctionName + "', available names are : " + OCollections.toString(getFunctionNames())); }
private static OIndexFactory findFactoryByAlgorithmAndType(String algorithm, String indexType) { for (OIndexFactory factory : getFactories()) { if (indexType == null || indexType.isEmpty() || (factory.getTypes().contains(indexType)) && factory.getAlgorithms() .contains(algorithm)) { return factory; } } throw new OIndexException( "Index type " + indexType + " with engine " + algorithm + " is not supported. Types are " + OCollections .toString(getIndexTypes())); }
throw new ODatabaseException("Invalid sorting. " + OCollections.toString(pairs));