4 ms·
I'm also not happy to add tons of tags in struct fields. Can you provide an example on how to do that? What I understand is to have a function inside the struct
by aacanakin 10y ago
I'm also not happy to add tons of tags in struct fields. Can you provide an example on how to do that?
What I understand is to have a function inside the struct namely like "map" and define the constraints there. I think we can do this in the next milestone of qb.
Can you open an issue about this? The github repo is https://github.com/aacanakin/qb https://github.com/aacanakin/qb
- grey-area 10y agoI just use a function taking the row from the db in the model and creating the model from that. It avoids tags and reflection at the cost of some verbosity.