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

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


                }
            }
            //using quotes around the cursor name to preserve case sensitivity
            updateWhereCurrentOfSQL.append(" WHERE CURRENT OF \"" + getCursorName() + "\"");
            lcc = getEmbedConnection().getLanguageConnection();
            statementContext = lcc.pushStatementContext(isAtomic, updateWhereCurrentOfSQL.toString(), null, false);
            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<=rd.getColumnCount(); i++) {
View Full Code Here


                deleteWhereCurrentOfSQL.append(getFullBaseTableName(activation.getPreparedStatement().getTargetTable()));//get the underlying (schema.)table name
                //using quotes around the cursor name to preserve case sensitivity
                deleteWhereCurrentOfSQL.append(" WHERE CURRENT OF \"" + getCursorName() + "\"");

                LanguageConnectionContext lcc = getEmbedConnection().getLanguageConnection();
                StatementContext statementContext = lcc.pushStatementContext(isAtomic, deleteWhereCurrentOfSQL.toString(), null, false);
                org.apache.derby.iapi.sql.PreparedStatement ps = lcc.prepareInternalStatement(deleteWhereCurrentOfSQL.toString());
                org.apache.derby.iapi.sql.ResultSet rs = ps.execute(lcc, true); //execute delete where current of sql
                rs.close();
                rs.finish();
                //For forward only resultsets, after a delete, the ResultSet will be positioned right before the next row.
View Full Code Here

           * that the ResultSet will get correctly closed down on an
           * error. (Cache the LanguageConnectionContext)
           */
          LanguageConnectionContext lcc = getEmbedConnection()
              .getLanguageConnection();
          StatementContext statementContext = lcc
              .pushStatementContext(isAtomic, getSQLText(),
                  getParameterValueSet(), false);

          boolean result = theResults.checkRowPosition(position);

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, getSource(), pvs, rollbackParentContext);

      if (needsSavepoint())
      {
        /* Mark this position in the log so that a statement
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

                }
            }
            //using quotes around the cursor name to preserve case sensitivity
            updateWhereCurrentOfSQL.append(" WHERE CURRENT OF \"" + getCursorName() + "\"");
            lcc = getEmbedConnection().getLanguageConnection();
            statementContext = lcc.pushStatementContext(isAtomic, updateWhereCurrentOfSQL.toString(), null, false);
            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<=rd.getColumnCount(); i++) {
View Full Code Here

                deleteWhereCurrentOfSQL.append(getFullBaseTableName(activation.getPreparedStatement().getTargetTable()));//get the underlying (schema.)table name
                //using quotes around the cursor name to preserve case sensitivity
                deleteWhereCurrentOfSQL.append(" WHERE CURRENT OF \"" + getCursorName() + "\"");

                LanguageConnectionContext lcc = getEmbedConnection().getLanguageConnection();
                StatementContext statementContext = lcc.pushStatementContext(isAtomic, deleteWhereCurrentOfSQL.toString(), null, false);
                org.apache.derby.iapi.sql.PreparedStatement ps = lcc.prepareInternalStatement(deleteWhereCurrentOfSQL.toString());
                org.apache.derby.iapi.sql.ResultSet rs = ps.execute(lcc, true); //execute delete where current of sql
                rs.close();
                rs.finish();
                //For forward only resultsets, after a delete, the ResultSet will be positioned right before the next row.
View Full Code Here

           * that the ResultSet will get correctly closed down on an
           * error. (Cache the LanguageConnectionContext)
           */
          LanguageConnectionContext lcc = getEmbedConnection()
              .getLanguageConnection();
          StatementContext statementContext = lcc
              .pushStatementContext(isAtomic, getSQLText(),
                  getParameterValueSet(), false);

          boolean result = theResults.checkRowPosition(position);

View Full Code Here

         * 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

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.