Added 4 new helper methods to QueryBuilder.

This commit is contained in:
Relintai 2021-11-14 21:05:08 +01:00
parent 4393c60e5f
commit 6f7b413e08
2 changed files with 17 additions and 0 deletions

View File

@ -102,6 +102,13 @@ QueryBuilder *QueryBuilder::val(const bool param) {
return this; return this;
} }
QueryBuilder *QueryBuilder::valf(const float param) {
return this;
}
QueryBuilder *QueryBuilder::vald(const double param) {
return this;
}
QueryBuilder *QueryBuilder::like(const String &str) { QueryBuilder *QueryBuilder::like(const String &str) {
return nlike(escape(str)); return nlike(escape(str));
} }
@ -124,6 +131,12 @@ QueryBuilder *QueryBuilder::setp(const String &col, const int param) {
QueryBuilder *QueryBuilder::setp(const String &col, const bool param) { QueryBuilder *QueryBuilder::setp(const String &col, const bool param) {
return this; return this;
} }
QueryBuilder *QueryBuilder::setpf(const String &col, const float param) {
return this;
}
QueryBuilder *QueryBuilder::setpd(const String &col, const double param) {
return this;
}
QueryBuilder *QueryBuilder::wp(const String &col, const String &param) { QueryBuilder *QueryBuilder::wp(const String &col, const String &param) {
return nwp(col, escape(param)); return nwp(col, escape(param));

View File

@ -46,6 +46,8 @@ public:
virtual QueryBuilder *val(const char *param); virtual QueryBuilder *val(const char *param);
virtual QueryBuilder *val(const int param); virtual QueryBuilder *val(const int param);
virtual QueryBuilder *val(const bool param); virtual QueryBuilder *val(const bool param);
virtual QueryBuilder *valf(const float param);
virtual QueryBuilder *vald(const double param);
virtual QueryBuilder *like(const String &str); virtual QueryBuilder *like(const String &str);
@ -56,6 +58,8 @@ public:
virtual QueryBuilder *setp(const String &col, const char *param); virtual QueryBuilder *setp(const String &col, const char *param);
virtual QueryBuilder *setp(const String &col, const int param); virtual QueryBuilder *setp(const String &col, const int param);
virtual QueryBuilder *setp(const String &col, const bool param); virtual QueryBuilder *setp(const String &col, const bool param);
virtual QueryBuilder *setpf(const String &col, const float param);
virtual QueryBuilder *setpd(const String &col, const double param);
virtual QueryBuilder *wp(const String &col, const String &param); virtual QueryBuilder *wp(const String &col, const String &param);
virtual QueryBuilder *wp(const String &col, const char *param); virtual QueryBuilder *wp(const String &col, const char *param);