757{
759
761 if (!
range.empty()) {
762 Oks::Tokenizer t(
range,
",");
763 std::string token, token1, token2;
764
765 while (t.next(token)) {
767 TLOG_DEBUG(2) <<
"token \'" << token <<
"\' of \'" <<
range <<
"\' allows any value";
769 return;
770 }
771
772 static const char __dot_dot_str[] = "..";
773 std::string::size_type p = token.find(__dot_dot_str, 0, (sizeof(__dot_dot_str) - 1));
774
775 bool pi;
776
777 if (p != std::string::npos) {
778 token1.assign(token, 0, p);
779 token2.assign(token, p + 2, std::string::npos);
781 } else {
782 token1.assign(token);
783 token2.clear();
784 pi = false;
785 }
786
788
789 if (mi && pi) {
790 TLOG_DEBUG(2) <<
"token \'" << token <<
"\' of \'" <<
range <<
"\' allows any value";
792 return;
793 }
794
795 OksData d1, d2;
796
797 if (!mi) {
798 d1.type = a->get_data_type();
799 d1.ReadFrom(token1, a);
800 }
801
802 if (token2.empty()) {
803 TLOG_DEBUG(2) <<
"token \'" << token <<
"\' of \'" <<
range <<
"\' defines equality condition";
805 } else {
806 if (!pi) {
807 d2.type = a->get_data_type();
808 d2.ReadFrom(token2, a);
809 }
810
811 if (mi) {
812 TLOG_DEBUG(2) <<
"token \'" << token <<
"\' of \'" <<
range <<
"\' defines smaller condition";
814 } else if (pi) {
815 TLOG_DEBUG(2) <<
"token \'" << token <<
"\' of \'" <<
range <<
"\' defines greater condition";
817 } else {
818 TLOG_DEBUG(2) <<
"token \'" << token <<
"\' of \'" <<
range <<
"\' defines interval condition";
820 }
821 }
822 }
823 }
824 } else {
825 try {
827 } catch (std::exception& ex) {
829 }
830 }
831}
BadReqExp(const std::string &what, const std::string &reason) noexcept
#define TLOG_DEBUG(lvl,...)
bool is_star(const std::string &s)