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.
As I figured out
ScanStructsfunction doesSELECT *by default and maps columns returned by query to struct's fields. This may lead togoqu: unable to find corresponding field to column \"column\" returned by queryerror 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
dbtag which provides this function.