-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
Description
👋 I have a few wants I'll likely be implementing in the coming days and would be curious as to whether you'd accept them upstream. Generally, these are centred around using goqu in an opt-in, rather than opt-out manner: I only want goqu to concern itself with explicitly-tagged fields.
Currently, only the db:"-"
struct tag can be used to avoid including a field in the select column set. There are no magic values like "-"
from the columnRenameFunction
that can be used to control this, either.
I'm planning to add one (or both?) of these:
- Likely a global
goqu.IgnoreUntaggedFields()
or similar that skips fields duringSelect()
etc. that don't have a tag set - Some flavour of
goqu.SetExtendedColumnRenameFunction(func(field *reflect.StructField) (colname string, ok bool))
where, ifok == false
, the field is ignored duringSelect()
and others - with the side benefit of exposing the raw*reflect.StructField
to the rename function.
Metadata
Metadata
Assignees
Labels
No labels