{"id":15002838,"url":"https://github.com/madeiradata/dynamicfilters","last_synced_at":"2025-10-30T09:31:00.655Z","repository":{"id":72814849,"uuid":"160202872","full_name":"MadeiraData/DynamicFilters","owner":"MadeiraData","description":"Example front-end website and back-end for fully-dynamic filtering capabilities (column, operator, value). Fully protected from SQL Injection.","archived":false,"fork":false,"pushed_at":"2021-05-27T05:23:16.000Z","size":8239,"stargazers_count":14,"open_issues_count":3,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-02T07:41:22.161Z","etag":null,"topics":["angular","angular4","angularjs","asp-net-core","asp-net-mvc","aspnetcoremvc","dynamic-filters","dynamic-search","mssql","mssqlserver","sql-server","sqlserver"],"latest_commit_sha":null,"homepage":"https://eitanblumin.com/portfolio/advanced-dynamic-search-queries/","language":"TSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MadeiraData.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-03T14:21:50.000Z","updated_at":"2024-10-27T18:07:22.000Z","dependencies_parsed_at":"2023-02-23T12:31:12.983Z","dependency_job_id":null,"html_url":"https://github.com/MadeiraData/DynamicFilters","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadeiraData%2FDynamicFilters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadeiraData%2FDynamicFilters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadeiraData%2FDynamicFilters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MadeiraData%2FDynamicFilters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MadeiraData","download_url":"https://codeload.github.com/MadeiraData/DynamicFilters/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238950485,"owners_count":19557533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular4","angularjs","asp-net-core","asp-net-mvc","aspnetcoremvc","dynamic-filters","dynamic-search","mssql","mssqlserver","sql-server","sqlserver"],"created_at":"2024-09-24T18:53:04.521Z","updated_at":"2025-10-30T09:30:59.909Z","avatar_url":"https://github.com/MadeiraData.png","language":"TSQL","readme":"# Dynamic Filters (a.k.a. FilterParseSearchParameters)\n\nThis repository includes an example front-end website, and a back-end database, for demonstrating fully-dynamic filtering capabilities (column, operator, value). Fully protected from SQL Injection, and based on \"low-code development\" principles.\n\nIt is the accompanying open-source project for the webinar [Advanced Dynamic Search Queries by Eitan Blumin](https://eitanblumin.com/portfolio/advanced-dynamic-search-queries/).\n\nThis is an enhanced version of **FilterParseXMLParameters** which is available here:\n\n[https://eitanblumin.com/2018/10/28/dynamic-search-queries-versus-sql-injection](https://eitanblumin.com/2018/10/28/dynamic-search-queries-versus-sql-injection/)\n\nThe new version introduces two new methods for dynamically parsing filter sets:\n1. Json parameter sets.\n2. Table-Valued Parameters.\n\nAs mentioned above, this repository also includes a fully-functional demo web app, implemented in ASP.NET Core MVC + AngularJS, to demonstrate the intended functionality on the front-end side.\n\n![Demo Web Client App Screenshot](demowebclient-screenshot.png \"Demo Web Client App\")\n\n\n## Prerequisites\n\n- [.NET Core 2.2 Installed](https://www.microsoft.com/net/core#windowscmd)\n- [Microsoft SQL Server 2016 version or newer](https://www.microsoft.com/en-us/sql-server/sql-server-downloads)\n- [Microsoft Visual Studio 2017 Community or newer](https://www.visualstudio.com/downloads/)\n- [SQL Server Data Tools (SSDT) for Visual Studio](https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt)\n\n## Installation \u0026 Setup\n\n1. Start by [forking or cloning this repository](https://github.com/EitanBlumin/DynamicFilters) to your computer, and opening the DynamicFilters solution in Visual Studio.\n2. Creating the Database: Do one of the following:\n\t- Open the [DemoDB_Create.sql](https://github.com/EitanBlumin/DynamicFilters/blob/master/DemoDB_Publish/DemoDB_Create.sql) script file and run it in your local SQL Server instance (must be **in SQLCMD mode**). Or:\n\t- Manually publish the [DemoDB.dacpac](https://github.com/EitanBlumin/DynamicFilters/blob/master/DemoDB_Publish/DemoDB.dacpac) file into your database. Or:\n\t- Open the DemoDB database project, and **publish** it to your local SQL Server instance.\n3. Optionally: Change the connection string in `\\DemoWebClient\\appsettings.json` in case you're not using default settings (localhost server, DemoDB database, Windows Authentication).\n4. Whenever you want to run the app: Right click on the `\\DemoWebClient\\runme.bat` executable and **Run it as Administrator**.\n5. The web app should now be available at [http://localhost:5000](http://localhost:5000) (you may also build the app from the web project, and the address would be [http://localhost:61907](http://localhost:61907) )\n\n## Presentation\n\nThis GitHub repository also includes an accompanying Powerpoint presentation, available here:\n\n- [DynamicFilters_Presentation_Eng.pptx](https://github.com/EitanBlumin/DynamicFilters/blob/master/DynamicFilters_Presentation_Eng.pptx)\n\n## Main Stored Procedures\n\nThe \"FilterParse\" stored procedures are the \"main engine\" for this solution. They can be found here:\n\n- [FilterParseTVPParameters](https://github.com/EitanBlumin/DynamicFilters/blob/master/DemoDB/Stored%20Procedures/dbo.FilterParseTVPParameters.sql)\n- [FilterParseJsonParameters](https://github.com/EitanBlumin/DynamicFilters/blob/master/DemoDB/Stored%20Procedures/dbo.FilterParseJsonParameters_Standalone.sql)\n- [FilterParseXmlParameters](https://github.com/EitanBlumin/DynamicFilters/blob/master/DemoDB/Stored%20Procedures/dbo.FilterParseXmlParameters_Standalone.sql)\n\nThe last two procedures (for Json and Xml) also have versions which can be used as \"wrappers\" that relay the information into the first procedure (using Table Valued Parameters). This should improve performance for scenarios involving large filter sets:\n\n- [FilterParseJsonParameters (wrapper)](https://github.com/EitanBlumin/DynamicFilters/blob/master/DemoDB/Stored%20Procedures/dbo.FilterParseJsonParameters.sql)\n- [FilterParseXmlParameters (wrapper)](https://github.com/EitanBlumin/DynamicFilters/blob/master/DemoDB/Stored%20Procedures/dbo.FilterParseXmlParameters.sql)\n\nAdditionally, these two procedures also have alternate versions that implement \"Encapsulation\" using an additional inner `sp_executesql` command, which should improve performance issues caused by bad parameter sniffing:\n\n- [FilterParseJsonParameters (with encapsulation)](https://github.com/EitanBlumin/DynamicFilters/blob/master/DemoDB/Stored%20Procedures/dbo.FilterParseJsonParameters_with_Encapsulation.sql)\n- [FilterParseXmlParameters (with encapsulation)](https://github.com/EitanBlumin/DynamicFilters/blob/master/DemoDB/Stored%20Procedures/dbo.FilterParseXmlParameters_with_Encapsulation.sql)\n\n## Main Meta-Data Tables\n\nIn addition to the stored procedures, the following \"meta-data\" tables are also needed in order to hold important configuration of tables, columns and operators:\n\n\n- [FilterTables](https://github.com/EitanBlumin/DynamicFilters/blob/master/DemoDB/Tables/dbo.FilterTables.sql)\n- [FilterColumns](https://github.com/EitanBlumin/DynamicFilters/blob/master/DemoDB/Tables/dbo.FilterColumns.sql)\n- [FilterOperators](https://github.com/EitanBlumin/DynamicFilters/blob/master/DemoDB/Tables/dbo.FilterOperators.sql)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadeiradata%2Fdynamicfilters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadeiradata%2Fdynamicfilters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadeiradata%2Fdynamicfilters/lists"}