-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
When you have a table with a field tagged omitempty, calling InsertRecords will fail if some records have empty values and some do not. The error is pgkit: ERROR: VALUES lists must all be the same length (SQLSTATE 42601).
This is because the reflection (correctly) ignores the fields tagged omitempty, which results in different fields being supplied for the insert statement.
https://github.com/goware/pgkit/blob/master/builder.go#L51
https://github.com/goware/pgkit/blob/master/mapper.go#L41
Example test case: #23
Metadata
Metadata
Assignees
Labels
No labels