@reflection.cache
def _get_table_sql(self, connection, table_name, schema=None, **kw):
    if schema:
        schema_expr = ('%s.' % self.identifier_preparer.quote_identifier(schema))
    else:
        schema_expr = ''
    try:
        s = ("SELECT sql FROM  (SELECT * FROM %(schema)ssqlite_master UNION ALL   SELECT * FROM %(schema)ssqlite_temp_master) WHERE name = ? AND type = 'table'" % {'schema': schema_expr})
        rs = connection.exec_driver_sql(s, (table_name,))
    except exc.DBAPIError:
        s = ("SELECT sql FROM %(schema)ssqlite_master WHERE name = ? AND type = 'table'" % {'schema': schema_expr})
        rs = connection.exec_driver_sql(s, (table_name,))
    return rs.scalar()
@reflection.cache
def _get_table_sql(self, connection, table_name, schema=None, **kw):
    if schema:
        schema_expr = ('%s.' % self.identifier_preparer.quote_identifier(schema))
    else:
        schema_expr = 
    try:
        s = ("SELECT sql FROM  (SELECT * FROM %(schema)ssqlite_master UNION ALL   SELECT * FROM %(schema)ssqlite_temp_master) WHERE name = ? AND type = 'table'" % {'schema': schema_expr})
        rs = connection.exec_driver_sql(s, (table_name,))
    except exc.DBAPIError:
        s = ("SELECT sql FROM %(schema)ssqlite_master WHERE name = ? AND type = 'table'" % {'schema': schema_expr})
        rs = connection.exec_driver_sql(s, (table_name,))
    return rs.scalar()