"name": row["name"],
"unique": row["is_unique"] == 1,
"column_names": [],
+ "include_columns": [],
}
+
+ if row["filter_definition"] is not None:
+ indexes[row["index_id"]].setdefault("dialect_options", {})[
+ "mssql_where"
+ ] = row["filter_definition"]
+
rp = connection.execution_options(future_result=True).execute(
sql.text(
- "select ind_col.index_id, ind_col.object_id, col.name "
+ "select ind_col.index_id, ind_col.object_id, col.name, "
+ "ind_col.is_included_column "
"from sys.columns as col "
"join sys.tables as tab on tab.object_id=col.object_id "
"join sys.index_columns as ind_col on "
text += " TABLESPACE %s" % preparer.quote(tablespace_name)
whereclause = index.dialect_options["postgresql"]["where"]
-
if whereclause is not None:
+ whereclause = coercions.expect(
+ roles.DDLExpressionRole, whereclause
+ )
+
where_compiled = self.sql_compiler.process(
whereclause, include_table=False, literal_binds=True
)