microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.56k stars 899 forks source link

Filter objects (tables) in the database objects tree view with a real CONTAINS #25005

Open ralphke opened 11 months ago

ralphke commented 11 months ago

Is your feature request related to a problem? Please describe. Within the SQL-Server Database object explorer we can filter on several properties via the filter object dialog. This dialog provides a contains filter which does not match the SQL-Server contains syntax, aka we cannot apply an "OR" or and "AND" logical operator to the CONTAINS clause.

Describe the solution or feature you'd like In our scenario, we need to operate on two to three different schemas within a database of 40k objects. It would be very helpful to have the ability to filter these objects to a workable number of tables by filtering them via an OR condition. Currently all filters set operate as an OR condition. The Contains filter makes us think that the SQL Server Contains operator is being used, but that does not work as expected. We would like to filter on the following expression for Property Schema: Operator: CONTAINS Value: "Dimension" OR "Fact" for example. This should result in filtering all tables in the tree view which exist in the Schemas Dimensions OR Fact. With a large surface of different tables in a single database, this would allow to narrow don the number of tables to be worked on.

Describe alternatives you've considered Alternatively, another filter column would make sense to allow connecting Property filters either by AND or OR operations. But instrumenting the Contains Filter with advanced logical operators would be much more flexible.

Additional context Azue Data Studio version in use: Version: 1.47.0 (system setup) Commit: c7c2b2f21505562d21972d4c135119d00806db4f Date: 2023-11-07T17:17:45.669Z VS Code: 1.82.0 Electron: 25.8.4 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.22631

dotnvo commented 1 month ago

+1. Having the ability to control the filter more and add/remove expressions makes a lot of sense. Let the user control the filter and let them add/remove properties as they see fit. They should even be able to add multiple properties and do OR operations on those (like name contains 'abc' OR name contains 'xyz'. This flexibility would help a lot.