Refactor Filtering
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 642
- Forks
- 70
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 21
Description
- Add implicit type conversions which will enable the filters to compare only values in contrast to comparing their types. We want to create some sort of trait that guarantees that this logic occurs for all filters.
- Avoid exposing expression and other irrelevant methods on FilterBuilders (atm, we panic if an irrelevant method is called on NodeDegree which is undesirable). For example, Node.degree(direction).all() should not even be a part of the NodeDegreeFilterBuilder interface.
- Create traits that make the code more reusable which will lead to consistent logic and easier to maintain code. This will also avoid the exposing irrelevant methods that occurs from a Filter inheriting a coupled trait. Also, some methods and struct attributes end up storing garbage values because they are irrelevant to the actual logic of the Filter.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by locating FilterBuilders, NodeDegreeFilterBuilder, Node.degree(direction), and the existing filter traits; map which methods are exposed and where type comparisons occur. Done means conversions and reusable traits cover all filters, irrelevant methods are unavailable rather than panicking, and irrelevant state is removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100