.. :py:method::

            parse the condition, support string and dictonary

def parse_condition(self, condition):
        """.. :py:method::

            parse the condition, support string and dictonary
        """
        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