Package org.apache.derby.iapi.sql.conn

Examples of org.apache.derby.iapi.sql.conn.StatementContext


        /* Push and pop a StatementContext around a next call
         * so that the ResultSet will get correctly closed down
         * on an error.
         * (Cache the LanguageConnectionContext)
         */
                StatementContext statementContext =
                    lcc.pushStatementContext(isAtomic,
               concurrencyOfThisResultSet==JDBC20Translation.CONCUR_READ_ONLY,
               getSQLText(),
               getParameterValueSet(),
                                             false, timeoutMillis);
View Full Code Here


     */
  public void checkCancellationFlag()
        throws
            StandardException
  {
        StatementContext localStatementContext = getLanguageConnectionContext().getStatementContext();           
        if (localStatementContext == null) {
            return;
        }

        if (localStatementContext.isCancelled()) {
            throw StandardException.newException(SQLState.LANG_STATEMENT_CANCELLED_OR_TIMED_OUT);
        }
    }
View Full Code Here

        /* Push and pop a StatementContext around a next call
         * so that the ResultSet will get correctly closed down
         * on an error.
         * (Cache the LanguageConnectionContext)
         */
                StatementContext statementContext =
                    lcc.pushStatementContext(isAtomic,
               concurrencyOfThisResultSet==JDBC20Translation.CONCUR_READ_ONLY,
               getSQLText(),
               getParameterValueSet(),
                                             false, timeoutMillis);
View Full Code Here

  public void insertRow() throws SQLException {
        synchronized (getConnectionSynchronization()) {
            checksBeforeInsert();
            setupContextStack();
            LanguageConnectionContext lcc = null;
            StatementContext statementContext = null;
            try {
                /*
                 * construct the insert statement
                 *
                 * If no values have been supplied for a column, it will be set
View Full Code Here

        // Check that the cursor is not positioned on insertRow
        checkNotOnInsertRow();
       
        setupContextStack();
        LanguageConnectionContext lcc = null;
        StatementContext statementContext = null;
        try {
            if (currentRowHasBeenUpdated == false) //nothing got updated on this row
                return; //nothing to do since no updates were made to this row

            //now construct the update where current of sql
View Full Code Here

            checkNotOnInsertRow();

            setupContextStack();
           
            LanguageConnectionContext lcc = null;
            StatementContext statementContext = null;
           
            //now construct the delete where current of sql
            try {
                StringBuffer deleteWhereCurrentOfSQL = new StringBuffer("DELETE FROM ");
                CursorActivation activation = getEmbedConnection().getLanguageConnection().lookupCursorActivation(getCursorName());
View Full Code Here

           * error. (Cache the LanguageConnectionContext)
           */
          LanguageConnectionContext lcc = getEmbedConnection()
              .getLanguageConnection();
                    // No timeout for this operation (use 0)
          StatementContext statementContext =
                        lcc.pushStatementContext(isAtomic,
             concurrencyOfThisResultSet==JDBC20Translation.CONCUR_READ_ONLY,
             getSQLText(),
                                                 getParameterValueSet(),
                                                 false, 0L);
View Full Code Here

  {
    if (autoCommit)
      throw newSQLException(SQLState.NO_SAVEPOINT_WHEN_AUTO);

    //Bug 4507 - savepoint not allowed inside trigger
    StatementContext stmtCtxt = getLanguageConnection().getStatementContext();
    if (stmtCtxt!= null && stmtCtxt.inTrigger())
      throw newSQLException(SQLState.NO_SAVEPOINT_IN_TRIGGER);
  }
View Full Code Here

    if ((conn == null) || conn.isClosed())
      throw Util.noCurrentConnection();

    if (!internal) {
      StatementContext sc = conn.getLanguageConnection().getStatementContext();
      if ((sc == null) || (sc.getSQLAllowed() < org.apache.derby.catalog.types.RoutineAliasInfo.MODIFIES_SQL_DATA))
        throw Util.noCurrentConnection();
    }

    return conn.getLocalDriver().getNewNestedConnection(conn);
  }
View Full Code Here

     * LanguageConnectionContext.
     */
    beginTime = getCurrentTimeMillis();
    beginExecutionTime = beginTime;

    StatementContext sc = lcc.getStatementContext();
    sc.setTopResultSet(this, (NoPutResultSet[]) null);

    // Pick up any materialized subqueries
    if (subqueryTrackingArray == null)
    {
      subqueryTrackingArray = sc.getSubqueryTrackingArray();
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.sql.conn.StatementContext

Copyright © 2018 www.massapicom. 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.