The connection raw sql query,  when select table,  show table
            to fetch records, it is compatible the dbi execute method.


        :param sql string: the sql stamtement like 'select * from %s'
        :param args  list: Wen set None, will use dbi execute(sql), else
            dbi execute(sql, args), the args keep the original rules, it shuld be tuple or list of list
        :param many  int: when set, the query method will return genarate an iterate
        :param as_dict bool: when is true, the type of row will be dict, otherwise is tuple

def query(self, sql, args=None, many=None, as_dict=False):
        """The connection raw sql query,  when select table,  show table
            to fetch records, it is compatible the dbi execute method.


        :param sql string: the sql stamtement like 'select * from %s'
        :param args  list: Wen set None, will use dbi execute(sql), else
            dbi execute(sql, args), the args keep the original rules, it shuld be tuple or list of list
        :param many  int: when set, the query method will return genarate an iterate
        :param as_dict bool: when is true, the type of row will be dict, otherwise is tuple
        """
        con = self.pool.pop()
        c = None
        try:
            c = con.cursor(as_dict)
            LOGGER.debug("Query sql: " + sql + " args:" + str(args))
            c.execute(sql, args)
            if many and many > 0:
                return self._yield(con, c, many)
            else:
                return c.fetchall()

        except Exception as e:
            LOGGER.error("Error Qeury on %s", str(e))
            raise DBError(e.args[0], e.args[1])
        finally:
            many or (c and c.close())
            many or (con and self.pool.push(con))