Skip to content
New issue

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

Nested nils #11

Open
mlitwiniuk opened this issue Jul 21, 2014 · 1 comment
Open

Nested nils #11

mlitwiniuk opened this issue Jul 21, 2014 · 1 comment

Comments

@mlitwiniuk
Copy link

Before submitting PR I would like to know your opinion. Basically hstore does not support nils - it returns empty strings instead. But while using your gem nils are present in nested hashes. In my opinion this should be unified in one way or another. What do you think?

@tombenner
Copy link
Owner

It'd be great to support nils at the hstore level. One approach might be to store a value like '___NULL___' for nils (there's a small chance that users may be using 'NULL' strings and I wouldn't want to interfere with that). The key shouldn't be modified, as that would affect users' queries, and I'd rather not add a type-defining second key (e.g. { 'my_key' => '', 'my_key_TYPE' => 'NULL' }), as that could potentially increase the size of some users' hstores significantly. What do you think would be the best solution?

Ideally numeric values would be preserved, too, but a solution for that isn't as clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants