def _get_table_pragma(self, connection, pragma, table_name, schema=None):
    quote = self.identifier_preparer.quote_identifier
    if (schema is not None):
        statements = [('PRAGMA %s.' % quote(schema))]
    else:
        statements = ['PRAGMA main.', 'PRAGMA temp.']
    qtable = quote(table_name)
    for statement in statements:
        statement = ('%s%s(%s)' % (statement, pragma, qtable))
        cursor = connection.exec_driver_sql(statement)
        if (not cursor._soft_closed):
            result = cursor.fetchall()
        else:
            result = []
        if result:
            return result
    else:
        return []
def _get_table_pragma(self, connection, pragma, table_name, schema=None):
    quote = self.identifier_preparer.quote_identifier
    if (schema is not None):
        statements = [('PRAGMA %s.' % quote(schema))]
    else:
        statements = ['PRAGMA main.', 'PRAGMA temp.']
    qtable = quote(table_name)
    for statement in statements:
        statement = ('%s%s(%s)' % (statement, pragma, qtable))
        cursor = connection.exec_driver_sql(statement)
        if (not cursor._soft_closed):
            result = cursor.fetchall()
        else:
            result = []
        if result:
            return result
    else:
        return []