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

HStore implementation to parse NULL values and filter them out from the HStoreList #215

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

saurabhnanda
Copy link

@saurabhnanda saurabhnanda commented Jun 11, 2017

Fixes #215 Related to #214

This has a minor side-effect where hstores with NULL values will not really
round-trip properly, i.e. if we read the following from the DB

"foo" => "bar", "fooNull" => NULL

we will get the following in Haskell

[("foo", "bar")]

and when stored back to the DB, it will get converted to:

"foo" => "bar"

This results in minor loss in fidelity. However, for all practical purposes,
the absence of a key, and the key being assigned a NULL value is the same
thing. How many programs out there would really be doing different things based
on this condition?

…he HStoreList.

This has a minor side-effect where hstores with NULL values will not really
round-trip properly, i.e. if we read the following from the DB

    "foo" => "bar", "fooNull" => NULL

we will get the following in Haskell

    [("foo", "bar")]

and when stored back to the DB, it will get converted to:

   "foo" => "bar"

This results in minor loss in fidelity. However, for all practical purposes,
the absence of a key, and the key being assigned a NULL value is the same
thing. How many programs out there would really be doing different things based
on this condition?
@saurabhnanda
Copy link
Author

@lpsmith what do you think of this approach? Pragmatically equivalent and doesn't introduce HStoreV2

@lpsmith
Copy link
Owner

lpsmith commented Jun 11, 2017

I can't say I am overly enthusiastic about this filtering approach, but maybe I am softening on it somewhat. I would probably prefer a breaking interface change to the filtering approach here. While I find the HStoreV2 approach that you suggested acceptable, I am undecided regarding my preference between that and a breaking interface change. HStoreV2 is probably the "right thing", but a breaking change would avoid some ugliness in the longer run, though it might create some other ugliness.

@saurabhnanda
Copy link
Author

saurabhnanda commented Jun 12, 2017 via email

@saurabhnanda
Copy link
Author

@lpsmith did you get a change to decide on this?

@saurabhnanda
Copy link
Author

@lpsmith any update on this?

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

Successfully merging this pull request may close these issues.

None yet

2 participants