We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
[]byte are encoded as strings leading to queries not accepted by Postgres.
[]byte
To Reproduce
package main import ( "log" "github.com/doug-martin/goqu/v9" ) type Test struct { Total uint32 `db:"total"` CardHash []byte `db:"card_hash"` } func main() { dialect := goqu.Dialect("postgres") t := &Test{ Total: 100, CardHash: []byte{40, 41, 42, 250, 0x0, 0x0}, } req := dialect.Insert("transactions").Rows(goqu.Record{"total": t.Total, "hash": t.CardHash}).Returning("id") sql, _, err := req.ToSQL() if err != nil { log.Fatal(err) } log.Println(sql) req = dialect.Insert("transactions").Rows(t).Returning("id") sql, _, err = req.ToSQL() if err != nil { log.Fatal(err) } log.Println(sql) }
Expected behavior
[]byte must be "hexified".
Dialect:
Additional context
Related #353.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
[]byte
are encoded as strings leading to queries not accepted by Postgres.To Reproduce
Expected behavior
[]byte
must be "hexified".Dialect:
Additional context
Related #353.
The text was updated successfully, but these errors were encountered: