code: def parse_condition(self, condition):
          
          if isinstance(condition, bytes):
              sql = " where {}".format(condition)
          elif isinstance(condition, dict):
              conditions = []
              for k, v in condition.iteritems():
                  if isinstance(v, unicode):
                      v = v.encode('utf-8')
                  s = "{}='{}'".format(k, v) if isinstance(v, bytes) else "{}={}".format(k, v)
                  conditions.append(s)
              sql = " where {}".format(', '.join(conditions))
          else:
              sql = ""
          return sql
docs: .. :py:method::
  
              parse the condition, support string and dictonary