Пример #1
0
 public static OCommandRequest selectCommandBuilder(
     String from, boolean count, QueryParams criteria) throws SqlInjectionException {
   OGraphDatabase db = DbHelper.getConnection();
   OCommandRequest command =
       db.command(
           new OSQLSynchQuery<ODocument>(selectQueryBuilder(from, count, criteria))
               .setFetchPlan(fetchPlan.replace("?", criteria.getDepth().toString())));
   if (!command.isIdempotent()) throw new SqlInjectionException();
   Logger.debug("commandBuilder: ");
   Logger.debug("  " + criteria.toString());
   Logger.debug("  " + command.toString());
   return command;
 }