Add the 'like' to the Criteria class

This commit is contained in:
antao 2018-12-05 09:50:36 +08:00
parent a7f82face0
commit e8fcc49c37
2 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,7 @@ addons:
- uuid-dev - uuid-dev
- zlib1g-dev - zlib1g-dev
- postgresql-server-dev-10 - postgresql-server-dev-10
- libmariadbclient-dev
- openssl - openssl
- libssl-dev - libssl-dev
- build-essential - build-essential
@ -30,6 +31,7 @@ addons:
- libtool - libtool
- lz4 - lz4
- postgresql - postgresql
- mariadb
script: script:
- ./build.sh - ./build.sh

View File

@ -33,6 +33,7 @@ enum class CompareOperator
GE, GE,
LT, LT,
LE, LE,
LIKE,
IsNull, IsNull,
IsNotNull IsNotNull
}; };
@ -67,6 +68,9 @@ class Criteria
case CompareOperator::LE: case CompareOperator::LE:
_condString += " <= $?"; _condString += " <= $?";
break; break;
case CompareOperator::LIKE:
_condString += " like $?";
break;
case CompareOperator::IsNull: case CompareOperator::IsNull:
case CompareOperator::IsNotNull: case CompareOperator::IsNotNull:
default: default: