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

Examples of org.apache.derby.iapi.sql.conn.LanguageConnectionContext.pushStatementContext()


         * so that the ResultSet will get correctly closed down
         * on an error.
         * (Cache the LanguageConnectionContext)
         */
                StatementContext statementContext =
                    lcc.pushStatementContext(isAtomic,
               concurrencyOfThisResultSet==java.sql.ResultSet.CONCUR_READ_ONLY,
               getSQLText(),
               getParameterValueSet(),
                                             false, timeoutMillis);

View Full Code Here


                insertSQL.append(") ");
                valuesSQL.append(") ");
                insertSQL.append(valuesSQL);

                // Context used for preparing, don't set any timeout (use 0)
                statementContext = lcc.pushStatementContext(
                        isAtomic,
                        false,
                        insertSQL.toString(),
                        null,
                        false,
View Full Code Here

            //using quotes around the cursor name to preserve case sensitivity
            updateWhereCurrentOfSQL.append(" WHERE CURRENT OF " +
                    quoteSqlIdentifier(getCursorName()));

            // Context used for preparing, don't set any timeout (use 0)
            statementContext = lcc.pushStatementContext(isAtomic, false, updateWhereCurrentOfSQL.toString(), null, false, 0L);
            org.apache.derby.iapi.sql.PreparedStatement ps = lcc.prepareInternalStatement(updateWhereCurrentOfSQL.toString());
            Activation act = ps.getActivation(lcc, false);

            //in this for loop we are assigning values for parameters in sql constructed earlier with columnname=?,...
            for (int i=1, paramPosition=0; i<=resultDescription.getColumnCount(); i++) {
View Full Code Here

                //using quotes around the cursor name to preserve case sensitivity
                deleteWhereCurrentOfSQL.append(" WHERE CURRENT OF " +
                        quoteSqlIdentifier(getCursorName()));
               
                // Context used for preparing, don't set any timeout (use 0)
                statementContext = lcc.pushStatementContext(isAtomic, false, deleteWhereCurrentOfSQL.toString(), null, false, 0L);
                org.apache.derby.iapi.sql.PreparedStatement ps = lcc.prepareInternalStatement(deleteWhereCurrentOfSQL.toString());
                // Get activation, so that we can get the warning from it
                Activation act = ps.getActivation(lcc, false);
                // Don't set any timeout when deleting rows (use 0)
                //execute delete where current of sql
View Full Code Here

           */
          LanguageConnectionContext lcc = getEmbedConnection()
              .getLanguageConnection();
                    // No timeout for this operation (use 0)
          StatementContext statementContext =
                        lcc.pushStatementContext(isAtomic,
             concurrencyOfThisResultSet==java.sql.ResultSet.CONCUR_READ_ONLY,
             getSQLText(),
                                                 getParameterValueSet(),
                                                 false, 0L);

View Full Code Here

      // method of the GenericTriggerExecutor class, and at that time
      // the SPS action will be recompiled correctly.
                rePrepare(lccToUse);
      }

      StatementContext statementContext = lccToUse.pushStatementContext(
        isAtomic, updateMode==CursorNode.READ_ONLY, getSource(), pvs, rollbackParentContext, timeoutMillis);

      statementContext.setActivation(activation);

      if (needsSavepoint())
View Full Code Here

            if (currSC != null) {
                parentAct = currSC.getActivation();
            }

            // Context used for preparing, don't set any timeout (use 0)
            statementContext = lcc.pushStatementContext(isAtomic, false, updateWhereCurrentOfSQL.toString(), null, false, 0L);

            // A priori, the new statement context inherits the activation of
            // the existing statementContext, so that that activation ends up
            // as parent of the new activation 'act' created below, which will
            // be the activation of the pushed statement context.
View Full Code Here

                if (currSC != null) {
                    parentAct = currSC.getActivation();
                }

                // Context used for preparing, don't set any timeout (use 0)
                statementContext = lcc.pushStatementContext(isAtomic, false, deleteWhereCurrentOfSQL.toString(), null, false, 0L);

                // A priori, the new statement context inherits the activation
                // of the existing statementContext, so that that activation
                // ends up as parent of the new activation 'act' created below,
                // which will be the activation of the pushed statement
View Full Code Here

           * that the ResultSet will get correctly closed down on an
           * error. (Cache the LanguageConnectionContext)
           */
                    // No timeout for this operation (use 0)
          StatementContext statementContext =
                        lcc.pushStatementContext(isAtomic,
             concurrencyOfThisResultSet==java.sql.ResultSet.CONCUR_READ_ONLY,
             getSQLText(),
                                                 getParameterValueSet(),
                                                 false, 0L);

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, getSQLText(),
                            getParameterValueSet(), false);

        switch (position)
        {
          case BEFOREFIRST:
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.