chef / sqerl

General purpose RDBMS abstraction layer
Apache License 2.0
42 stars 18 forks source link

Saving undefined record fields as NULL in the DB #69

Closed wk8 closed 10 years ago

wk8 commented 10 years ago

Instead of `"undefined"'

wk8 commented 10 years ago

Motivated by https://chef.leankit.com/Boards/View/89094476/113125853

seth commented 10 years ago

This is great. Would be really nice to have a test with it.

seth commented 10 years ago

Nice. Thanks for adding some test coverage. And the remapping from null to undefined seems like a good choice to keep things simple.

Couple more things before merge:

  1. When you squash down, this patch would benefit from a more detailed commit message.
  2. Let's update the docs to describe the behavior with NULL and undefined. Somewhere here: https://github.com/opscode/sqerl/blob/master/doc/sqerl_rec.md (you edit the edoc, and then regen with make doc).