def table_exists(self, tablename: str) -> bool:
        """Does the table exist?"""
        # information_schema is ANSI standard
        sql = """
            SELECT COUNT(*)
            FROM information_schema.tables
            WHERE table_name=?
            AND table_schema={}
        """.format(self.get_current_schema_expr())
        row = self.fetchone(sql, tablename)
        return True if row[0] >= 1 else False
def table_exists ( self , tablename : str ) -> bool : sql = """
            SELECT COUNT(*)
            FROM information_schema.tables
            WHERE table_name=?
            AND table_schema={}
        """ . format ( self . get_current_schema_expr ( ) ) row = self . fetchone ( sql , tablename ) return True if row [ 0 ] >= 1 else False
Does the table exist?