-
-
Notifications
You must be signed in to change notification settings - Fork 5
Add document filtering #357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
❌ 1 Tests Failed:
View the full list of 69 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
995287e to
a3eb9e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds document filtering capabilities to the PaperlessDotNet library, allowing users to filter documents using strongly-typed expression syntax instead of manually constructing query strings.
- Introduces expression-based filtering for documents with support for various filter operations (equality, comparison, string operations, etc.)
- Adds new filter classes (
DocumentFilter,PaginatedFilter,IdFilter,NameFilter) to represent filterable fields - Implements query string generation from LINQ expressions with proper URL encoding
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
ExpressionExtensions.cs |
Core logic for converting LINQ expressions to Paperless API query strings |
DocumentFilter.cs |
Filter model defining all filterable document properties |
IDocumentClient.cs / DocumentClient.cs |
API interface and implementation for filtered document retrieval |
Routes.cs |
Updated routing to support query parameters |
Document.cs |
Added missing OwnerId property |
| Test files | Comprehensive test coverage for expression parsing and filtering |
README.md |
Documentation for the new filtering feature |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
source/VMelnalksnis.PaperlessDotNet/Filters/ExpressionExtensions.cs
Outdated
Show resolved
Hide resolved
source/VMelnalksnis.PaperlessDotNet/Filters/ExpressionExtensions.cs
Outdated
Show resolved
Hide resolved
a3eb9e4 to
0422dd2
Compare
|
✔️ 0422dd2 - Conventional commits check succeeded. |
Fixes #344