From 14e1e14ed8baaef898a1c8bf5007901c012bb05c Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Mon, 28 Sep 2020 12:16:24 +0300 Subject: [PATCH] Fix string arguments in query --- lib/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/query.py b/lib/query.py index 12ea1b8..2f93c27 100644 --- a/lib/query.py +++ b/lib/query.py @@ -44,7 +44,7 @@ def __repr__(self): sel='col{}'.format(self.sel_index), ) if self.conditions: - rep += ' WHERE ' + ' AND '.join(['{} {} {}'.format('col{}'.format(i), self.cond_ops[o], v) for i, o, v in self.conditions]) + rep += ' WHERE ' + ' AND '.join(['{} {} {}'.format('col{}'.format(i), self.cond_ops[o], '\"' + v + '\"' if isinstance(v, str) else v) for i, o, v in self.conditions]) return rep def to_dict(self):