00001 /* 00002 // $Id: //open/dev/fennel/lucidera/bitmap/LbmSearchExecStream.h#5 $ 00003 // Fennel is a library of data storage and processing components. 00004 // Copyright (C) 2006-2009 LucidEra, Inc. 00005 // Copyright (C) 2006-2009 The Eigenbase Project 00006 // 00007 // This program is free software; you can redistribute it and/or modify it 00008 // under the terms of the GNU General Public License as published by the Free 00009 // Software Foundation; either version 2 of the License, or (at your option) 00010 // any later version approved by The Eigenbase Project. 00011 // 00012 // This program is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // GNU General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU General Public License 00018 // along with this program; if not, write to the Free Software 00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 */ 00021 00022 #ifndef Fennel_LbmSearchExecStream_Included 00023 #define Fennel_LbmSearchExecStream_Included 00024 00025 #include "fennel/exec/DynamicParam.h" 00026 #include "fennel/ftrs/BTreePrefetchSearchExecStream.h" 00027 00028 FENNEL_BEGIN_NAMESPACE 00029 00034 struct LbmSearchExecStreamParams : public BTreePrefetchSearchExecStreamParams 00035 { 00040 DynamicParamId rowLimitParamId; 00041 00046 DynamicParamId startRidParamId; 00047 }; 00048 00056 class FENNEL_LBM_EXPORT LbmSearchExecStream 00057 : public BTreePrefetchSearchExecStream 00058 { 00064 bool ridInKey; 00065 00070 DynamicParamId rowLimitParamId; 00071 00075 bool ignoreRowLimit; 00076 00081 DynamicParamId startRidParamId; 00082 00086 RecordNum rowLimit; 00087 00091 LcsRid startRid; 00092 00096 TupleDatum rowLimitDatum; 00097 00101 TupleDatum startRidDatum; 00102 00106 TupleData ridSearchKeyData; 00107 00113 bool ridKeySetup; 00114 00121 virtual bool reachedTupleLimit(uint nTuples); 00122 00127 virtual void setAdditionalKeys(); 00128 00134 virtual void setLowerBoundKey(PConstBuffer buf); 00135 00136 public: 00137 virtual void prepare(LbmSearchExecStreamParams const ¶ms); 00138 }; 00139 00140 FENNEL_END_NAMESPACE 00141 00142 #endif 00143 00144 // End LbmSearchExecStream.h