arthurkushman / buildsqlx

Go database query builder library for PostgreSQL
MIT License
172 stars 17 forks source link

How can update the value of record to null #79

Closed hzjux001 closed 2 years ago

hzjux001 commented 2 years ago

How can update the value of record to null just like update tablename set timefield=NULL where id=123

arthurkushman commented 2 years ago

Hi @hzjux001 thx for report, there were problems with that - now they are fixed. Here is the release - https://github.com/arthurkushman/buildsqlx/releases/tag/v0.8.3

Now u can update fields like this:

err := db.Table(TestTable).Insert(map[string]interface{}{"created_at": t, "updated_at": nil})