Skip to content

Allow Queryx.Unsafe() #365

@JonasDoe

Description

@JonasDoe

Right now, if I want to leave out some fields from be scanned into a struct, I have do to something like

query.Iter().Unsafe().Select(&myStruct);
...
defer query.Release()

This took me quite some time searching through the code to find out, and the documentation for QueryX.Iter() doesn't even suggest this is a valid use case.

Ideally, I could invoke instead:

query.Unsafe().SelectRelease(&myStruct)

This would be similar to the DB.Unsafe() method and easier to use.

If I'm not missing something, I guess I could create a PR for it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions