Closed eko234 closed 3 years ago
You can use db.NULL
db = require("lapis.db") data = { field: db.NULL, ...... }
Thanks Criztianix, is there a way to put this in the official documentation, I think it'd be good to have an explicit example there.
It is already documented https://leafo.net/lapis/reference/database.html
db.update "the_table", { name: db.NULL }
Oh sorry, i was looking it up In the Models section, My Bad, thankyou again.
I can't find a way to set a field back to null using the update method from a model entity, deleting the row and creating it again feels like a hack, is there a better way to do it?