Skip to content

select from using db tags #447

Description

@Rilord

As I figured out ScanStructs function does SELECT * by default and maps columns returned by query to struct's fields. This may lead to goqu: unable to find corresponding field to column \"column\" returned by query error after adding new column to table. Is there any way to select only columns defined by struct's db tag within goqu library?

FYI, there is huandu/go-sqlbuilder which provides quite useful feature to select columns based on struct's fields with certain db tag which provides this function.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions