mojolicious / mojo-pg

Mojolicious :heart: PostgreSQL
https://metacpan.org/release/Mojo-Pg
Artistic License 2.0
99 stars 46 forks source link

Expand hstore columns. #13

Closed jkramer closed 8 years ago

jkramer commented 8 years ago

Please expand the values of columns of type hstore (simple key/value assignments) in Mojo::Pg::Results::expand as well. Currently the a scalar with the text representation is returned.

http://www.postgresql.org/docs/current/static/hstore.html

kraih commented 8 years ago

Are there any reasons to use hstore over jsonb these days?

jkramer commented 8 years ago

Are there any reasons to use hstore over jsonb these days?

Nothing really, but it'd be convenient for existing databases. However I just figured out that I can just cast the hstore column to ::json to get it expanded.