Skip to content

Commit 46e5a0a

Browse files
committed
fix the bug that '.' exists in the field.
1 parent aeb3f20 commit 46e5a0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/peersafe/app/sql/SQLConditionTree.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,9 @@ int conditionTree::format_conditions(int style, std::string& conditions) const {
414414
int conditionTree::format_value(const BindValue& value, std::string& result) const {
415415
int ret = 0;
416416
if (value.isString() || value.isBlob() || value.isText() || value.isVarchar()) {
417-
if(value.asString().find(".") == std::string::npos)
417+
if (value.isString() || value.asString().find(".") == std::string::npos) {
418418
result = (boost::format("'%1%'") % value.asString()).str();
419-
else {
419+
}else {
420420
// especially for one field equal another field
421421
const std::string& v = value.asString();
422422
if (v[0] == '$' && v[1] == '.') {

0 commit comments

Comments
 (0)