Package com.orientechnologies.orient.core.db.record

Examples of com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.command()


   * @return an OCommandRequest object ready to be passed to the {@link #selectCommandExecute(com.orientechnologies.orient.core.command.OCommandRequest, Object[])} (OCommandRequest, String[])} method
   * @throws SqlInjectionException If the query is not a select statement
   */
  public static OCommandRequest selectCommandBuilder(String from, boolean count, QueryParams criteria) throws SqlInjectionException{
    ODatabaseRecordTx db =  DbHelper.getConnection();
    OCommandRequest command = db.command(new OSQLSynchQuery<ODocument>(
        selectQueryBuilder(from, count, criteria)
        ));
    if (!command.isIdempotent()) throw new SqlInjectionException();
    if (Logger.isDebugEnabled()) Logger.debug("commandBuilder: ");
    if (Logger.isDebugEnabled()) Logger.debug("  " + criteria.toString());
View Full Code Here


   * @param theQuery
   * @return
   */
  public static OCommandRequest genericSQLStatementCommandBuilder (String theQuery){
    ODatabaseRecordTx db =  DbHelper.getConnection();
    OCommandRequest command = db.command(new OCommandSQL(theQuery));
    return command;
  }
 
  /***
   * Executes a generic SQL command statements
View Full Code Here

    is.close();

    for (String line:script){
      if (Logger.isDebugEnabled()) Logger.debug(line);
      if (!line.startsWith("--") && !line.trim().isEmpty()){ //skip comments
        db.command(new OCommandSQL(line.replace(';', ' '))).execute();
      }
    }
    Internal.DB_VERSION._setValue(BBConfiguration.configuration.getString(IBBConfigurationKeys.API_VERSION));
    String uniqueId="";
    try{
View Full Code Here

   * @param commandString
   * @param params
   */
  public void executeCommand(String commandString, Object[] params) {
    ODatabaseRecordTx db =  DbHelper.getConnection();
    OCommandRequest command=db.command(new OCommandSQL(commandString));
    //Logger.debug("########## is in transaction??  : " + db.getTransaction().isActive());
    command.execute(params);
  }
 
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.