apache / apache/cassandra-gocql-driver
suggestion for Unmarshal version 2
- Dominant language
- Go
- Stars
- 2.7k
- Forks
- 658
- PR merge metrics
- No merged PRs in 30d
Description
I was doing another project and i had to look into gocql Unmarshal . And i saw that can do gocql Unmarshal more fast and clear, here description:
Since I considered this from the user's side, I can say that users can be divided into two types:
1. Those who need fast clear work, possibly with small predictable variations,
2. Those who need fast clear work, with full or partial customization.
Currently gocql Unmarshal realizes it through the same path in the code.
That's why, there are a lot of "if", "switch", "reflect" in the code.
Too much uncertainty in what has come and what needs to be given, it`s causes fast clear work to suffer.
Solution - separate paths in code for different user groups needs and shifting the choice point of the Unmarshals path to the stage of define column types or earlier stage.
Approximate solution description:
1. Each type has its own "default Unmarshal interface",
2. For each type Implemented several variations of "Unmarshal interface",
3. Each cluster has its own set of "default Unmarshal interfaces",
4. The user is given the opportunity to choose the "default Unmarshal interface" from the set (described in paragraph 2) or replace it with custom "Unmarshal interface", within the entire cluster and/or a specific query. Or not choose any for processing by defaults.
The amount of changes will not be small, so, i can take to make gocql Unmarshal version 2, if you agree with this described current Unmarshal situation and with solutions concept.
Contributor guide
Research direction
Start by tracing the current gocql Unmarshal path and how column types, clusters, and queries are defined, focusing on the stated use of if, switch, and reflection. The scope is a substantial redesign: separate default and customizable unmarshalling paths and define how users select them at cluster or query level.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100