sqlite_orm
sqlite_orm copied to clipboard
SOS
const auto filter0 = c(&TestRec::Get_m_strStopTime) == "00-00-00";
const auto filter1 = not m_oCheckBox[0].GetCheck() or c(&TestRec::Get_m_nWorkStationID) == nID;
const auto filter2 = not m_oCheckBox[1].GetCheck() or c(&TestRec::Get_m_strBatchNo) == strOrderNo;
const auto filter3 = not m_oCheckBox[2].GetCheck() or like(&TestRec::Get_m_strStartTime, strStartTime +"%");
auto v = dv.m_ptrStorage->get_all<TestRec>(where( filter2 /*&& filter1 && filter2 && filter3*/));
If I use constants, it works fine, such as the first one. If I use string variables, the source code error location is as follows
template<class A, class T, class E>
std::string string_from_expression(const conditions::like_t<A, T, E> &l, bool noTableName) const {
std::stringstream ss;
ss << this->string_from_expression(l.arg, noTableName) << " ";
ss << static_cast<std::string>(l) << " ";
ss << this->string_from_expression(l.pattern, noTableName);
l.arg3.apply([&ss, this, noTableName](auto &value) {
ss << " ESCAPE " << this->string_from_expression(value, noTableName);
});
return ss.str();
}
const auto filter0 = c(&TestRec::Get_m_strStopTime) == "00-00-00"; const auto filter1 = not m_oCheckBox[0].GetCheck() or c(&TestRec::Get_m_nWorkStationID) == nID; const auto filter2 = not m_oCheckBox[1].GetCheck() or c(&TestRec::Get_m_strBatchNo) == strOrderNo; const auto filter3 = not m_oCheckBox[2].GetCheck() or like(&TestRec::Get_m_strStartTime, strStartTime +"%"); auto v = dv.m_ptrStorage->get_all<TestRec>(where( filter2 /*&& filter1 && filter2 && filter3*/)); If I use constants, it works fine, such as the first one. If I use string variables, the source code error location is as follows template<class A, class T, class E> std::string string_from_expression(const conditions::like_t<A, T, E> &l, bool noTableName) const { std::stringstream ss; ss << this->string_from_expression(l.arg, noTableName) << " "; ss << static_cast<std::string>(l) << " "; ss << this->string_from_expression(l.pattern, noTableName); l.arg3.apply([&ss, this, noTableName](auto &value) { ss << " ESCAPE " << this->string_from_expression(value, noTableName); }); return ss.str(); }
post make_storage call to repro this issue
@fool404 also post error text and line
@fool404 are you here?
closing due to inactivity