linksplatform / linksplatform/Data.Doublets
Initiative of simplifying logic of Each/Count
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 14
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
In current implementation:
```elixir
function CountBase {
if query.Len == 0 {
...
}
if query.Len == 1 {
...
}
if query.Len == 2 {
...
}
. . . .
}
```
I suggest impl `CountBase` only for query of link size:
```elixir
function CountBase {
assert query.Len == 3
. . . .
}
function CountExt {
match query {
[] => CountBase([Any, Any, Any])
. . . .
[id, from_id, to_id, ..] => CountBase([id, from_id, to_id])
}
}
```
Also, i recommend add more complex logic for `CountBase([Value, Value])`. Anything that is more complicated than `if` or completely reject it query
Contributor guide
No contributing guide indexed for this repository
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
Start by locating CountBase and CountExt in the C# library and reviewing how Each/Count currently handle different query lengths. Clarify the supported query shapes and the intended behavior for Value/Value cases before changing anything; done means the agreed simplification and rejection or handling rules are verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100