sql - Advanced hstore with postgresql -


in ruby on rails application have sql retrieve advanced data , convert sql output hash , update proper model record. in sql have line one:

hstore(array_agg('some_key'::text), array_agg('some_value'::text))  loaded_user_data 

which after converting hash returns me:

 "loaded_user_data"=>"\"some_key\"=>\"some_value\"" 

but problem want have hash looks little bit different. example:

 loaded_user_data: {     loaded: { count:  100, details: [] },     failed: { count: 2, details: ['duplicate', 'invalid_external_id']},     invalidated: {count: 1, details: ['requested client']}  } 

is there way hstore?


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -