Skip to content

[QUESTION] How can I achieve the samve behavior as go-pg's use_zero for pointer fields? #617

@Warashi

Description

@Warashi

How can I achieve the same behavior as go-pg's use_zero for pointer fields?
The behavior is the same as use_zero by default for normal fields, but nil in a pointer field is marshaled to null.
In go-pg, I think use_zero will marshal to zero value, but how can I achieve this with bun?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions