00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include "memdb/memdb.hpp"
00029 #include "base/list.hpp"
00030 #include "base/memory.hpp"
00031 #include "base/string.hpp"
00032 #include "base/common.hpp"
00033 #include "base/vector.hpp"
00034 #include "base/map.hpp"
00035
00036 BEGIN_TERIMBER_NAMESPACE
00037 #pragma pack(4)
00039
00040
00041
00042
00043 terimber_db_value_vector_impl::terimber_db_value_vector_impl(size_t count)
00044 {
00045 _value.resize(count);
00046 }
00047
00048
00049
00050
00051
00052 terimber_db_value_vector_impl::~terimber_db_value_vector_impl()
00053 {
00054 }
00055
00056 size_t
00057 terimber_db_value_vector_impl::get_size() const
00058 {
00059 return _value.size();
00060 }
00061
00062
00063 bool
00064 terimber_db_value_vector_impl::set_value_as_null(size_t index, dbtypes type)
00065 {
00066 if (index >= _value.size())
00067 return false;
00068
00069 return _value[index].set_as_null(db_param_in, type);
00070 }
00071
00072 bool
00073 terimber_db_value_vector_impl::set_value_as_bool(size_t index, bool val)
00074 {
00075 if (index >= _value.size())
00076 return false;
00077
00078 return _value[index].set_as_bool(db_param_in, val);
00079 }
00080
00081 bool
00082 terimber_db_value_vector_impl::set_value_as_char(size_t index, sb1_t val)
00083 {
00084 if (index >= _value.size())
00085 return false;
00086
00087 return _value[index].set_as_char(db_param_in, val);
00088 }
00089
00090 bool
00091 terimber_db_value_vector_impl::set_value_as_byte(size_t index, ub1_t val)
00092 {
00093 if (index >= _value.size())
00094 return false;
00095
00096 return _value[index].set_as_byte(db_param_in, val);
00097 }
00098
00099 bool
00100 terimber_db_value_vector_impl::set_value_as_short(size_t index, sb2_t val)
00101 {
00102 if (index >= _value.size())
00103 return false;
00104
00105 return _value[index].set_as_short(db_param_in, val);
00106 }
00107
00108 bool
00109 terimber_db_value_vector_impl::set_value_as_word(size_t index, ub2_t val)
00110 {
00111 if (index >= _value.size())
00112 return false;
00113
00114 return _value[index].set_as_word(db_param_in, val);
00115 }
00116
00117 bool
00118 terimber_db_value_vector_impl::set_value_as_long(size_t index, sb4_t val)
00119 {
00120 if (index >= _value.size())
00121 return false;
00122
00123 return _value[index].set_as_long(db_param_in, val);
00124 }
00125
00126 bool
00127 terimber_db_value_vector_impl::set_value_as_dword(size_t index, ub4_t val)
00128 {
00129 if (index >= _value.size())
00130 return false;
00131
00132 return _value[index].set_as_dword(db_param_in, val);
00133 }
00134
00135 bool
00136 terimber_db_value_vector_impl::set_value_as_float(size_t index, float val)
00137 {
00138 if (index >= _value.size())
00139 return false;
00140
00141 return _value[index].set_as_float(db_param_in, val);
00142 }
00143
00144 bool
00145 terimber_db_value_vector_impl::set_value_as_double(size_t index, double val)
00146 {
00147 if (index >= _value.size())
00148 return false;
00149
00150 return _value[index].set_as_double(db_param_in, val);
00151 }
00152
00153 bool
00154 terimber_db_value_vector_impl::set_value_as_long64(size_t index, sb8_t val)
00155 {
00156 if (index >= _value.size())
00157 return false;
00158
00159 return _value[index].set_as_long64(db_param_in, val);
00160 }
00161
00162 bool
00163 terimber_db_value_vector_impl::set_value_as_dword64(size_t index, ub8_t val)
00164 {
00165 if (index >= _value.size())
00166 return false;
00167
00168 return _value[index].set_as_dword64(db_param_in, val);
00169 }
00170
00171 bool
00172 terimber_db_value_vector_impl::set_value_as_guid(size_t index, const guid_t& val)
00173 {
00174 if (index >= _value.size())
00175 return false;
00176
00177 return _value[index].set_as_guid(db_param_in, val);
00178 }
00179
00180 bool
00181 terimber_db_value_vector_impl::set_value_as_numeric(size_t index, const char* val, char delimeter)
00182 {
00183 if (index >= _value.size())
00184 return false;
00185
00186 return _value[index].set_as_numeric(db_param_in, val, delimeter);
00187 }
00188
00189 bool
00190 terimber_db_value_vector_impl::set_value_as_decimal(size_t index, const char* val, char delimeter)
00191 {
00192 if (index >= _value.size())
00193 return false;
00194
00195 return _value[index].set_as_decimal(db_param_in, val, delimeter);
00196 }
00197
00198 bool
00199 terimber_db_value_vector_impl::set_value_as_date(size_t index, ub4_t year, ub1_t month, ub1_t day, ub1_t hour, ub1_t minute, ub1_t second, ub2_t millisec)
00200 {
00201 if (index >= _value.size())
00202 return false;
00203
00204 return _value[index].set_as_date(db_param_in, year, month, day, hour, minute, second, millisec);
00205 }
00206
00207 bool
00208 terimber_db_value_vector_impl::set_value_as_string(size_t index, const char* val, size_t len)
00209 {
00210 if (index >= _value.size())
00211 return false;
00212
00213 return _value[index].set_as_string(db_param_in, val, len);
00214 }
00215
00216 bool
00217 terimber_db_value_vector_impl::set_value_as_string_ptr(size_t index, const char* val)
00218 {
00219 if (index >= _value.size())
00220 return false;
00221
00222 return _value[index].set_as_string_ptr(val);
00223 }
00224
00225 bool
00226 terimber_db_value_vector_impl::set_value_as_wstring(size_t index, const wchar_t* val, size_t len)
00227 {
00228 if (index >= _value.size())
00229 return false;
00230
00231 return _value[index].set_as_wstring(db_param_in, val, len);
00232 }
00233
00234 bool
00235 terimber_db_value_vector_impl::set_value_as_wstring_ptr(size_t index, const wchar_t* val)
00236 {
00237 if (index >= _value.size())
00238 return false;
00239
00240 return _value[index].set_as_wstring_ptr(val);
00241 }
00242
00243
00244 bool
00245 terimber_db_value_vector_impl::set_value_as_binary(size_t index, const ub1_t* val, size_t len)
00246 {
00247 if (index >= _value.size())
00248 return false;
00249
00250 return _value[index].set_as_binary(db_param_in, val, len);
00251 }
00252
00253 bool
00254 terimber_db_value_vector_impl::set_value_as_binary_ptr(size_t index, const ub1_t* val)
00255 {
00256 if (index >= _value.size())
00257 return false;
00258
00259 return _value[index].set_as_binary_ptr(val);
00260 }
00261
00262
00263 bool
00264 terimber_db_value_vector_impl::get_value_is_null(size_t index) const
00265 {
00266 if (index >= _value.size())
00267 return false;
00268
00269 return _value[index]._value.nullVal;
00270 }
00271
00272 bool
00273 terimber_db_value_vector_impl::get_value_as_bool(size_t index) const
00274 {
00275 return get_value_as_value(index, vt_bool).boolVal;
00276 }
00277
00278 sb1_t
00279 terimber_db_value_vector_impl::get_value_as_char(size_t index) const
00280 {
00281 return get_value_as_value(index, vt_sb1).cVal;
00282 }
00283
00284 ub1_t
00285 terimber_db_value_vector_impl::get_value_as_byte(size_t index) const
00286 {
00287 return get_value_as_value(index, vt_ub1).bVal;
00288 }
00289
00290 sb2_t
00291 terimber_db_value_vector_impl::get_value_as_short(size_t index) const
00292 {
00293 return get_value_as_value(index, vt_sb2).iVal;
00294 }
00295
00296 ub2_t
00297 terimber_db_value_vector_impl::get_value_as_word(size_t index) const
00298 {
00299 return get_value_as_value(index, vt_ub2).uiVal;
00300 }
00301
00302 sb4_t
00303 terimber_db_value_vector_impl::get_value_as_long(size_t index) const
00304 {
00305 return get_value_as_value(index, vt_sb4).lVal;
00306 }
00307
00308 ub4_t
00309 terimber_db_value_vector_impl::get_value_as_dword(size_t index) const
00310 {
00311 return get_value_as_value(index, vt_ub4).ulVal;
00312 }
00313
00314 float
00315 terimber_db_value_vector_impl::get_value_as_float(size_t index) const
00316 {
00317 return get_value_as_value(index, vt_float).fltVal;
00318 }
00319
00320 double
00321 terimber_db_value_vector_impl::get_value_as_double(size_t index) const
00322 {
00323 #ifdef OS_64BIT
00324 return get_value_as_value(index, vt_double).dblVal;
00325 #else
00326 const double* ret = get_value_as_value(index, vt_double).dblVal;
00327 return ret ? *ret : 0.0;
00328 #endif
00329 }
00330
00331 sb8_t
00332 terimber_db_value_vector_impl::get_value_as_long64(size_t index) const
00333 {
00334 #ifdef OS_64BIT
00335 return get_value_as_value(index, vt_sb8).intVal;
00336 #else
00337 const sb8_t* ret = get_value_as_value(index, vt_sb8).intVal;
00338 return ret ? *ret : 0;
00339 #endif
00340 }
00341
00342 ub8_t
00343 terimber_db_value_vector_impl::get_value_as_dword64(size_t index) const
00344 {
00345 #ifdef OS_64BIT
00346 return get_value_as_value(index, vt_ub8).uintVal;
00347 #else
00348 const ub8_t* ret = get_value_as_value(index, vt_ub8).uintVal;
00349 return ret ? *ret : 0;
00350 #endif
00351 }
00352
00353
00354 bool
00355 terimber_db_value_vector_impl::get_value_as_guid(size_t index, guid_t& val) const
00356 {
00357 const guid_t* ret = get_value_as_value(index, vt_guid).guidVal;
00358 if (!ret)
00359 return false;
00360
00361 val = *ret;
00362 return true;
00363 }
00364
00365
00366 const char*
00367 terimber_db_value_vector_impl::get_value_as_numeric(size_t index, char delimeter) const
00368 {
00369 const ub1_t* retVal = get_value_as_value(index, vt_numeric).bufVal;
00370
00371 if(!retVal)
00372 {
00373 assert(false);
00374 return 0;
00375 }
00376
00377 numeric num;
00378 if (!num.parse_orcl(retVal))
00379 {
00380 assert(false);
00381 return 0;
00382 }
00383
00384 size_t len = num.is_zero() ? 2 : num.precision() + (num.sign() ? 1 : 0) + (num.scale() ? 1 : 0) + (num.precision() == num.scale()) + 1;
00385 char* retStr = (char*)_tmp_allocator.allocate(len);
00386 num.format(retStr, delimeter);
00387 return retStr;
00388 }
00389
00390
00391 const char*
00392 terimber_db_value_vector_impl::get_value_as_decimal(size_t index, char delimeter) const
00393 {
00394 return get_value_as_numeric(index, delimeter);
00395 }
00396
00397
00398 bool
00399 terimber_db_value_vector_impl::get_value_as_date(size_t index, ub4_t& year, ub1_t& month, ub1_t& day, ub1_t& hour, ub1_t& minute, ub1_t& second, ub2_t& millisec, ub1_t& wday, ub2_t& yday) const
00400 {
00401 #ifdef OS_64BIT
00402 date dt(get_value_as_value(index, vt_date).intVal);
00403 #else
00404 const sb8_t* val = get_value_as_value(index, vt_date).intVal;
00405 if (!val)
00406 return false;
00407 date dt(*val);
00408 #endif
00409
00410 return date::convert_from(dt, year, month, day, hour, minute, second, millisec, wday, yday);
00411 }
00412
00413
00414 const char*
00415 terimber_db_value_vector_impl::get_value_as_string(size_t index) const
00416 {
00417 return get_value_as_value(index, vt_string).strVal;
00418 }
00419
00420
00421 const wchar_t*
00422 terimber_db_value_vector_impl::get_value_as_wstring(size_t index) const
00423 {
00424 return get_value_as_value(index, vt_wstring).wstrVal;
00425 }
00426
00427
00428
00429
00430 const ub1_t*
00431 terimber_db_value_vector_impl::get_value_as_binary(size_t index, size_t& len) const
00432 {
00433 const ub1_t* buf = get_value_as_value(index, vt_binary).bufVal;
00434 len = buf ? *(size_t*)buf : 0;
00435 return buf ? buf + sizeof(size_t) : 0;
00436 }
00437
00438
00439
00440
00441
00442 const ub1_t*
00443 terimber_db_value_vector_impl::get_value_as_binary_ptr(size_t index) const
00444 {
00445 return get_value_as_value(index, vt_binary).bufVal;
00446 }
00447
00448
00449 terimber_xml_value
00450 terimber_db_value_vector_impl::get_value_as_value(size_t index, vt_types type) const
00451 {
00452 try
00453 {
00454 if (index >= _value.size()
00455 || _value[index]._value.nullVal)
00456 exception::_throw("Out of range");
00457
00458 vt_types type_ = dbserver_impl::convert_types(_value[index]._type);
00459 _tmp_allocator.reset();
00460 return type_ != type ? parse_value(type,
00461 persist_value(type_, _value[index]._value.val, &_tmp_allocator),
00462 0xffffffff,
00463 &_tmp_allocator) : _value[index]._value.val;
00464 }
00465 catch (...)
00466 {
00467 terimber_xml_value val;
00468 memset(&val, 0, sizeof(terimber_xml_value));
00469 return val;
00470 }
00471 }
00472
00474 memlookup::memlookup(memindex& parent) :
00475 _parent(parent),
00476 _low_bounder(parent.get_index().end()),
00477 _upper_bounder(parent.get_index().end()),
00478 _current_iter(parent.get_index().end())
00479 {
00480 memdb_row dummy_row;
00481 _condition_rowset.push_back(dummy_row);
00482 memdb_rowset_t::iterator iter = _condition_rowset.begin();
00483
00484 const memdb_rowset_less& pred = _parent.get_index().comp();
00485 size_t length = pred.get_info().size();
00486 iter->_row.resize(_condition_allocator, length);
00487
00488 for (size_t i = 0; i < length; ++i)
00489 iter->_row[i].nullVal = true;
00490
00491 iter->_status = status_lookup;
00492 }
00493
00494 memlookup::~memlookup()
00495 {
00496 }
00497
00498 bool
00499 memlookup::construct(const terimber_db_value_vector_impl* info)
00500 {
00501
00502 const memdb_rowset_less& pred = _parent.get_index().comp();
00503 size_t size = info ? info->get_size() : 0;
00504
00505 if (size > pred.get_info().size())
00506 return false;
00507
00508 if (size)
00509 {
00510
00511 _tmp_allocator.reset();
00512
00513 memdb_rowset_t::iterator iter = _condition_rowset.begin();
00514
00515 string_t error;
00516
00517 if (!copy_db_row(info, *iter, pred.get_info(), size, _tmp_allocator, error))
00518 return false;
00519
00520 memdb_index_t::paircc_t bounders = _parent.get_index().equal_range(iter);
00521 _low_bounder = bounders.first;
00522 _current_iter = _upper_bounder = bounders.second;
00523 }
00524 else
00525 {
00526
00527 _low_bounder = _parent.get_index().begin();
00528 _current_iter = _upper_bounder = _parent.get_index().end();
00529 }
00530
00531 return true;
00532 }
00533
00534
00535
00536
00537 bool
00538 memlookup::assign(const terimber_memlookup& x)
00539 {
00540
00541 const memlookup& that = static_cast< const memlookup& >(x);
00542
00543 if (&_parent != &that._parent)
00544 return false;
00545
00546 _low_bounder = that._low_bounder;
00547 _upper_bounder = that._upper_bounder;
00548 _current_iter = that._current_iter;
00549 return true;
00550 }
00551
00552
00553
00554
00555
00556 bool
00557 memlookup::reset(const terimber_db_value_vector* info)
00558 {
00559 return construct(static_cast< const terimber_db_value_vector_impl* >(info));
00560 }
00561
00562
00563
00564
00565
00566 bool
00567 memlookup::next() const
00568 {
00569
00570
00571 if (_current_iter == _upper_bounder)
00572 _current_iter = _low_bounder;
00573 else
00574 ++_current_iter;
00575
00576
00577 return _current_iter != _upper_bounder;
00578 }
00579
00580
00581
00582
00583
00584 bool
00585 memlookup::prev() const
00586 {
00587
00588
00589 if (_current_iter == _low_bounder)
00590 _current_iter = _upper_bounder;
00591 else
00592 --_current_iter;
00593
00594
00595 return _current_iter != _upper_bounder;
00596 }
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611
00612
00613 bool
00614 memlookup::get_value_is_null(size_t index) const
00615 {
00616 if (_current_iter == _upper_bounder
00617 || index >= _parent.get_table().get_column_count())
00618 return false;
00619
00620 return (*_current_iter)->_row[index].nullVal;
00621 }
00622
00623 bool
00624 memlookup::get_value_as_bool(size_t index) const
00625 {
00626 return get_value_as_value(index, vt_bool).boolVal;
00627 }
00628
00629 sb1_t
00630 memlookup::get_value_as_char(size_t index) const
00631 {
00632 return get_value_as_value(index, vt_sb1).cVal;
00633 }
00634
00635 ub1_t
00636 memlookup::get_value_as_byte(size_t index) const
00637 {
00638 return get_value_as_value(index, vt_ub1).bVal;
00639 }
00640
00641 sb2_t
00642 memlookup::get_value_as_short(size_t index) const
00643 {
00644 return get_value_as_value(index, vt_sb2).iVal;
00645 }
00646
00647 ub2_t
00648 memlookup::get_value_as_word(size_t index) const
00649 {
00650 return get_value_as_value(index, vt_ub2).uiVal;
00651 }
00652
00653 sb4_t
00654 memlookup::get_value_as_long(size_t index) const
00655 {
00656 return get_value_as_value(index, vt_sb4).lVal;
00657 }
00658
00659 ub4_t
00660 memlookup::get_value_as_dword(size_t index) const
00661 {
00662 return get_value_as_value(index, vt_ub4).ulVal;
00663 }
00664
00665 float
00666 memlookup::get_value_as_float(size_t index) const
00667 {
00668 return get_value_as_value(index, vt_float).fltVal;
00669 }
00670
00671 double
00672 memlookup::get_value_as_double(size_t index) const
00673 {
00674 #ifdef OS_64BIT
00675 return get_value_as_value(index, vt_double).dblVal;
00676 #else
00677 const double* ret = get_value_as_value(index, vt_double).dblVal;
00678 return ret ? *ret : 0.0;
00679 #endif
00680 }
00681
00682 sb8_t
00683 memlookup::get_value_as_long64(size_t index) const
00684 {
00685 #ifdef OS_64BIT
00686 return get_value_as_value(index, vt_sb8).intVal;
00687 #else
00688 const sb8_t* ret = get_value_as_value(index, vt_sb8).intVal;
00689 return ret ? *ret : 0;
00690 #endif
00691 }
00692
00693 ub8_t
00694 memlookup::get_value_as_dword64(size_t index) const
00695 {
00696 #ifdef OS_64BIT
00697 return get_value_as_value(index, vt_ub8).uintVal;
00698 #else
00699 const ub8_t* ret = get_value_as_value(index, vt_ub8).uintVal;
00700 return ret ? *ret : 0;
00701 #endif
00702 }
00703
00704
00705 bool
00706 memlookup::get_value_as_guid(size_t index, guid_t& val) const
00707 {
00708 const guid_t* ret = get_value_as_value(index, vt_guid).guidVal;
00709 if (!ret)
00710 return false;
00711
00712 val = *ret;
00713 return true;
00714 }
00715
00716
00717 const char*
00718 memlookup::get_value_as_numeric(size_t index, char delimeter) const
00719 {
00720 const ub1_t* retVal = get_value_as_value(index, vt_numeric).bufVal;
00721
00722 if(!retVal)
00723 {
00724 assert(false);
00725 return 0;
00726 }
00727
00728 numeric num;
00729 if (!num.parse_orcl(retVal))
00730 {
00731 assert(false);
00732 return 0;
00733 }
00734
00735 size_t len = num.is_zero() ? 2 : num.precision() + (num.sign() ? 1 : 0) + (num.scale() ? 1 : 0) + (num.precision() == num.scale()) + 1;
00736 char* retStr = (char*)_tmp_allocator.allocate(len);
00737 num.format(retStr, delimeter);
00738 return retStr;
00739 }
00740
00741
00742 const char*
00743 memlookup::get_value_as_decimal(size_t index, char delimeter) const
00744 {
00745 return get_value_as_numeric(index, delimeter);
00746 }
00747
00748
00749 bool
00750 memlookup::get_value_as_date(size_t index, ub4_t& year, ub1_t& month, ub1_t& day, ub1_t& hour, ub1_t& minute, ub1_t& second, ub2_t& millisec, ub1_t& wday, ub2_t& yday) const
00751 {
00752 #ifdef OS_64BIT
00753 date dt(get_value_as_value(index, vt_date).intVal);
00754 #else
00755 const sb8_t* val = get_value_as_value(index, vt_date).intVal;
00756 if (!val)
00757 return false;
00758 date dt(*val);
00759 #endif
00760
00761 return date::convert_from(dt, year, month, day, hour, minute, second, millisec, wday, yday);
00762 }
00763
00764
00765 const char*
00766 memlookup::get_value_as_string(size_t index) const
00767 {
00768 return get_value_as_value(index, vt_string).strVal;
00769 }
00770
00771
00772 const wchar_t*
00773 memlookup::get_value_as_wstring(size_t index) const
00774 {
00775 return get_value_as_value(index, vt_wstring).wstrVal;
00776 }
00777
00778
00779
00780
00781 const ub1_t*
00782 memlookup::get_value_as_binary(size_t index, size_t& len) const
00783 {
00784 const ub1_t* buf = get_value_as_value(index, vt_binary).bufVal;
00785 len = buf ? *(size_t*)buf : 0;
00786 return buf ? buf + sizeof(size_t) : 0;
00787 }
00788
00789
00790
00791
00792
00793 const ub1_t*
00794 memlookup::get_value_as_binary_ptr(size_t index) const
00795 {
00796 return get_value_as_value(index, vt_binary).bufVal;
00797 }
00798
00799 terimber_xml_value
00800 memlookup::get_value_as_value(size_t index, vt_types type) const
00801 {
00802 try
00803 {
00804 if (_current_iter == _upper_bounder
00805 || index >= _parent.get_table().get_column_count())
00806 exception::_throw("Out of range");
00807
00808 vt_types type_ = dbserver_impl::convert_types(_parent.get_table().get_column_type(index));
00809 _tmp_allocator.reset();
00810 return type_ != type ? parse_value(type,
00811 persist_value(type_,(*_current_iter)->_row[index].val, &_tmp_allocator),
00812 0xffffffff,
00813 &_tmp_allocator) : (*_current_iter)->_row[index].val;
00814 }
00815 catch (...)
00816 {
00817 terimber_xml_value val;
00818 memset(&val, 0, sizeof(terimber_xml_value));
00819 return val;
00820 }
00821 }
00822
00823
00824
00825
00826
00827
00828
00829
00830
00831
00832
00833
00834
00835
00836
00837
00838 bool
00839 memlookup::insert_row(const terimber_db_value_vector* info)
00840 {
00841
00842
00843
00844 return _parent.get_table().insert_row(info);
00845 }
00846
00847
00848
00849
00850
00851
00852
00853 bool
00854 memlookup::delete_row()
00855 {
00856
00857
00858
00859
00860 if (_current_iter == _upper_bounder)
00861 return false;
00862
00863 return _parent.get_table().delete_row(*_current_iter);
00864 }
00865
00866
00867
00868
00869
00870
00871 bool
00872 memlookup::update_row(const terimber_db_value_vector* info)
00873 {
00874
00875
00876
00877
00878 if (_current_iter == _upper_bounder)
00879 return false;
00880
00881 return _parent.get_table().update_row(*_current_iter, info);
00882 }
00883
00884
00885
00886
00887
00888
00889
00890
00891 terimber_db_row_status
00892 memlookup::get_row_status()
00893 {
00894 if (_current_iter == _upper_bounder)
00895 return status_deleted;
00896
00897 return (*_current_iter)->_status;
00898 }
00899
00900 void
00901 memlookup::notify(memdb_index_citer_t iter, bool insert_or_delete)
00902 {
00903 memdb_rowset_t::const_iterator conditer = _condition_rowset.begin();
00904 memdb_index_t::paircc_t bounders = _parent.get_index().equal_range(conditer);
00905 memdb_index_citer_t curr = _low_bounder = bounders.first;
00906 _upper_bounder = bounders.second;
00907
00908
00909
00910 if (curr != _parent.get_index().end())
00911 {
00912 while (curr != _upper_bounder)
00913 if (_current_iter == curr)
00914 return;
00915 else
00916 ++curr;
00917 }
00918
00919 _current_iter = _upper_bounder;
00920 }
00921
00922
00923 #pragma pack()
00924 END_TERIMBER_NAMESPACE