Adding is_filtered_index for SQL Server dialect
See original GitHub issueI noticed that SQLAlchemy does not reflect the filter definition of SQL Server indexes. I see how this makes sense since you expect the filter definition to be a SQLAlchemy construct instead of a SQL string.
https://docs.sqlalchemy.org/en/13/dialects/mssql.html#filtered-indexes
However, it is not possible to determine if a unique index implies uniqueness in a subset of the table or the entire table without this information. Would be possible to add an is_filtered_index
dialect-specific kwarg for MSSQL Server or something along these lines? I would be happy to implement it and submit a PR.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Create filtered indexes - SQL Server - Microsoft Learn
A filtered index is an optimized disk-based rowstore nonclustered index especially suited to cover queries that select from a well-defined ...
Read more >how to configure hibernate config file for sql server
Change the Dialect used by Hibernate to talk to the database. There are two drivers to connect to SQL Server; the open source...
Read more >Introduction to SQL Server Filtered Indexes - SQLShack
A SQL Server filtered index is a non-clustered index that allows us to apply specific conditions to cover a subset of rows in...
Read more >Configuring Spring Boot for Microsoft SQL Server
On the SQL Server Services node, right-click SQL Server (SQLEXPRESS), and select Restart. This sets up SQL Server to be reached from JDBC...
Read more >Microsoft SQL Server - SQLAlchemy 1.4 Documentation
An INSERT statement which attempts to provide a value for a column that is marked with IDENTITY will be rejected by SQL Server....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
hey there.
Can we just augment the first query at the top of def get_indexes() with the extra columns? that way we can just use the query we already have.
RamonWill has proposed a fix for this issue in the master branch:
Add support for SQL Server filtered indexes https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/2142