1 21 22 package org.apache.derby.impl.sql.compile; 23 24 import org.apache.derby.iapi.services.context.ContextManager; 25 26 import org.apache.derby.iapi.sql.compile.CostEstimate; 27 import org.apache.derby.iapi.sql.compile.Optimizable; 28 import org.apache.derby.iapi.sql.compile.OptimizableList; 29 import org.apache.derby.iapi.sql.compile.OptimizablePredicate; 30 import org.apache.derby.iapi.sql.compile.OptimizablePredicateList; 31 import org.apache.derby.iapi.sql.compile.Optimizer; 32 import org.apache.derby.iapi.sql.compile.Visitable; 33 import org.apache.derby.iapi.sql.compile.Visitor; 34 import org.apache.derby.iapi.sql.compile.RequiredRowOrdering; 35 36 import org.apache.derby.iapi.sql.dictionary.DataDictionary; 37 38 import org.apache.derby.iapi.sql.Activation; 39 import org.apache.derby.iapi.sql.ResultSet; 40 41 import org.apache.derby.iapi.error.StandardException; 42 43 import org.apache.derby.impl.sql.compile.ActivationClassBuilder; 44 45 import org.apache.derby.iapi.services.compiler.MethodBuilder; 46 import org.apache.derby.iapi.reference.ClassName; 47 48 import org.apache.derby.iapi.services.sanity.SanityManager; 49 50 import org.apache.derby.iapi.util.JBitSet; 51 import org.apache.derby.iapi.services.classfile.VMOpcode; 52 53 import java.util.Properties ; 54 55 62 63 public class ScrollInsensitiveResultSetNode extends SingleChildResultSetNode 64 { 65 72 73 public void init( 74 Object childResult, 75 Object rcl, 76 Object tableProperties) 77 { 78 init(childResult, tableProperties); 79 resultColumns = (ResultColumnList) rcl; 80 } 81 82 87 public void generate(ActivationClassBuilder acb, 88 MethodBuilder mb) 89 throws StandardException 90 { 91 if (SanityManager.DEBUG) 92 SanityManager.ASSERT(resultColumns != null, "Tree structure bad"); 93 94 97 assignResultSetNumber(); 98 99 101 103 costEstimate = childResult.getFinalCostEstimate(); 105 106 int erdNumber = acb.addItem(makeResultDescription()); 107 108 acb.pushGetResultSetFactoryExpression(mb); 109 110 childResult.generate(acb, mb); 111 acb.pushThisAsActivation(mb); 112 mb.push(resultSetNumber); 113 mb.push(resultColumns.size()); 114 115 mb.pushThis(); 116 mb.callMethod(VMOpcode.INVOKEVIRTUAL, ClassName.BaseActivation, "getScrollable", 117 "boolean", 0); 118 119 mb.push(costEstimate.rowCount()); 120 mb.push(costEstimate.getEstimatedCost()); 121 122 mb.callMethod(VMOpcode.INVOKEINTERFACE, (String ) null, "getScrollInsensitiveResultSet", 123 ClassName.NoPutResultSet, 7); 124 } 125 } 126 | Popular Tags |