)
indexes = []
- # regular expression to extract the filter predicate of a partial index.
- # this could fail to extract the predicate correctly on indexes created like
+ # regular expression to extract the filter predicate of a partial
+ # index. this could fail to extract the predicate correctly on
+ # indexes created like
# CREATE INDEX i ON t (col || ') where') WHERE col <> ''
- # but as this function does not support expression-based indexes this case
- # does not occur.
+ # but as this function does not support expression-based indexes
+ # this case does not occur.
partial_pred_re = re.compile(r"\)\s+where\s+(.+)", re.IGNORECASE)
if schema:
insp = inspect(connection)
expected = [
- {"name": "t_idx_2", "column_names": ["x"], "unique": False}
+ {
+ "name": "t_idx_2",
+ "column_names": ["x"],
+ "unique": False,
+ "dialect_options": {},
+ }
]
def completeIndex(entry):
"create table foo_with_partial_index (x integer, y integer)"
)
conn.exec_driver_sql(
- "create unique index ix_partial on foo_with_partial_index (x) where y > 10"
+ "create unique index ix_partial on "
+ "foo_with_partial_index (x) where y > 10"
)
inspector = inspect(conn)