28 #ifndef INFINISQLINDEX_H
29 #define INFINISQLINDEX_H
73 typedef std::multimap<std::string, nonLockingIndexEntry_s>
75 typedef boost::unordered_map<std::string, lockingIndexEntry>
111 template <
typename T >
112 void getequal(T input, std::vector<indexEntry_s> *returnEntries)
123 template <
typename T >
124 void getin(T input, vector<indexEntry_s> *returnEntries)
127 for (
size_t n=0; n < input->size(); n++)
141 void getnotequal(int64_t input, vector<indexEntry_s> *returnEntries);
148 void getnotequal(uint64_t input, vector<indexEntry_s> *returnEntries);
155 void getnotequal(
bool input, vector<indexEntry_s> *returnEntries);
162 void getnotequal(
long double input, vector<indexEntry_s> *returnEntries);
169 void getnotequal(
char input, vector<indexEntry_s> *returnEntries);
176 void getnotequal(
string input, vector<indexEntry_s> *returnEntries);
182 void getnotnulls(vector<indexEntry_s> *returnEntries);
191 vector<indexEntry_s> *returnEntries);
200 vector<indexEntry_s> *returnEntries);
209 vector<indexEntry_s> *returnEntries);
218 vector<indexEntry_s> *returnEntries);
227 vector<indexEntry_s> *returnEntries);
236 vector<indexEntry_s> *returnEntries);
248 void between(int64_t lower, int64_t upper,
249 vector<indexEntry_s> *returnEntries);
261 void between(uint64_t lower, uint64_t upper,
262 vector<indexEntry_s> *returnEntries);
274 void between(
bool lower,
bool upper,
275 vector<indexEntry_s> *returnEntries);
287 void between(
long double lower,
long double upper,
288 vector<indexEntry_s> *returnEntries);
300 void between(
char lower,
char upper,
301 vector<indexEntry_s> *returnEntries);
313 void between(
string lower,
string upper,
314 vector<indexEntry_s> *returnEntries);
328 void notbetween(T lower, T upper, vector<indexEntry_s> *returnEntries)
342 void regex(
string *regexStr, vector<indexEntry_s> *returnEntries);
351 void like(
string &likeStr, vector<indexEntry_s> *returnEntries);
358 void notlike(
string &likeStr, vector<indexEntry_s> *returnEntries);
365 void getnotin(vector<int64_t> &entries,
366 vector<indexEntry_s> *returnEntries);
373 void getnotin(vector<uint64_t> &entries,
374 vector<indexEntry_s> *returnEntries);
381 void getnotin(vector<bool> &entries,
382 vector<indexEntry_s> *returnEntries);
389 void getnotin(vector<long double> &entries,
390 vector<indexEntry_s> *returnEntries);
397 void getnotin(vector<char> &entries,
398 vector<indexEntry_s> *returnEntries);
405 void getnotin(vector<string> &entries,
406 vector<indexEntry_s> *returnEntries);
554 int64_t newrowid, int64_t newengineid,
570 int64_t newrowid, int64_t newengineid,
586 int64_t newrowid, int64_t newengineid,
602 int64_t newrowid, int64_t newengineid,
618 int64_t newrowid, int64_t newengineid,
634 int64_t newrowid, int64_t newengineid,
648 void replaceNull(int64_t oldrowid, int64_t oldengineid,
649 int64_t newrowid, int64_t newengineid);
656 void getnulls(vector<indexEntry_s> *returnEntries);
810 void getall(vector<indexEntry_s> *returnEntries);
828 int64_t tacmdentrypoint);
845 int64_t tacmdentrypoint);
862 int64_t tacmdentrypoint);
879 int64_t tacmdentrypoint);
896 int64_t tacmdentrypoint);
913 int64_t tacmdentrypoint);
920 void getequal_f(int64_t entry, vector<indexEntry_s> *returnEntries);
927 void getequal_f(uint64_t entry, vector<indexEntry_s> *returnEntries);
934 void getequal_f(
bool entry, vector<indexEntry_s> *returnEntries);
941 void getequal_f(
long double entry, vector<indexEntry_s> *returnEntries);
948 void getequal_f(
char entry, vector<indexEntry_s> *returnEntries);
955 void getequal_f(
string entry, vector<indexEntry_s> *returnEntries);
1045 bool checkifmatch(int64_t val, int64_t rowid, int64_t engineid);
1055 bool checkifmatch(uint64_t val, int64_t rowid, int64_t engineid);
1065 bool checkifmatch(
bool val, int64_t rowid, int64_t engineid);
1075 bool checkifmatch(
long double val, int64_t rowid, int64_t engineid);
1085 bool checkifmatch(
char val, int64_t rowid, int64_t engineid);
1095 bool checkifmatch(
string &val, int64_t rowid, int64_t engineid);
1107 void rm(int64_t val);
1113 void rm(uint64_t val);
1125 void rm(
long double val);
1137 void rm(
string &val);
1163 template <
class T,
class U,
class V>
1166 if (!regexStr->size())
1171 string tmpStr = *regexStr;
1178 size_t n = tmpStr.find_first_of(
"[\\^$.|?*+()", 0);
1182 *itBegin = mapPtr->begin();
1183 *itEnd = mapPtr->end();
1187 string beginStr(tmpStr, 0, std::min(n, regexStr->size()));
1188 string endStr = beginStr;
1190 if (endStr[endStr.size()-1] == 255)
1192 endStr.append(1, 1);
1196 endStr[endStr.size()-1]++;
1199 *itBegin = mapPtr->find(beginStr);
1201 if (*itBegin == mapPtr->end())
1203 *itBegin = mapPtr->upper_bound(beginStr);
1206 *itEnd = mapPtr->lower_bound(endStr);
1241 boost::unordered_map< int64_t, std::queue<lockQueueIndexEntry> >
1243 boost::unordered_map< uint64_t, std::queue<lockQueueIndexEntry> >
1245 boost::unordered_map< bool, std::queue<lockQueueIndexEntry> >
1247 boost::unordered_map< long double, std::queue<lockQueueIndexEntry> >
1249 boost::unordered_map< char, std::queue<lockQueueIndexEntry> >
1251 boost::unordered_map< std::string, std::queue<lockQueueIndexEntry> >
1258 boost::unordered_set< vector<int64_t> >
nulls;