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 Postgres 9.4 #15

Open
hafizio opened this issue May 7, 2015 · 1 comment
Open

Hstore Postgres 9.4 #15

hafizio opened this issue May 7, 2015 · 1 comment

Comments

@hafizio
Copy link

hafizio commented May 7, 2015

Hi there, thank you for this gem which is very useful.

My question is, how does this gem different from the nested array support in posgres 9.4? I noticed that the default hstore is storing nested element as string and not the original data type. Is there any other differences? Thank you in advance!

@glennfu
Copy link

glennfu commented Jun 4, 2015

If you store this natively:

model.data = {
  foo: "bar",
  thing: { asdf: "zxcv" }
}

You'll find that model.data["thing"].class == "String" instead of "Hash". With this plugin, it'll be a Hash. This applies also to Arrays and other primitive types.

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