Introduce helpers to construct raw query string for FK data fetching with serializable class#965
Introduce helpers to construct raw query string for FK data fetching with serializable class#965hieuwu wants to merge 5 commits into
Conversation
| return result | ||
| } | ||
|
|
||
| fun buildKeyString(descriptor: SerialDescriptor, className: String): String { |
Check warning
Code scanning / detekt
Public functions require documentation. Warning
|
I know that specifying columns currently isn't ideal especially with FKs, thats why I introduced #769, but to have somewhat of consistency between client libs I'm still waiting for implementations in other client libs. But great work, #769 has a more general approach for solving the columns problem via a KSP plugin cc @grdsdev |
Interesting. I also tried KSP at the beginning but it took me too much time for general approach so I ended up just build helper functions 😂. |
Sure, I can publish a version. You can try |
What kind of change does this PR introduce?
Introduce helpers to construct raw query string for FK data fetching with serializable class
What is the current behavior?
Currently, when query data with foreign keys, we need to define a hardcoded string. For query that has one FK and multiple FK, they are different in format
DTOclass changes, the related query has to be changed accordingly, now it is done manuallyWhat is the new behavior?
Introduce helpers to construct raw query string with serializable classes
DTO classcan be used to construct query and decode dataFor example: