Re: [GENERAL] jsonb - Mailing list pgsql-general

From John R Pierce
Subject Re: [GENERAL] jsonb
Date
Msg-id 7c21b041-2026-aebf-a695-51156521b35e@hogranch.com
Whole thread Raw
In response to Re: [GENERAL] jsonb  (hmidi slim <hmidi.slim2@gmail.com>)
List pgsql-general
On 11/14/2017 2:30 PM, hmidi slim wrote:
> I'm trying to use the function to_jsonb and create the name:
> to_jsonb ('{"key1":" ' || 'text1' || '","key2":" ' || 'text2' || '"}');
> But after that I used Objection.js ORM to get data using the query:
> Product.query().where('id',1).then(prod => {console.log(prod)})
> I think that the problem maybe with the usage of to_jsonb function, 
> maybe I miss something. But when I fetch the data with the ORM I found 
> that the type was a string and not a jsonb
>

never heard of your ORM... does it even know what postgres jsonb is ?   
do you know what actual SQL query that piece of ORMism generates ?



-- 
john r pierce, recycling bits in santa cruz



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Johannes Graën
Date:
Subject: Re: [GENERAL] jsonb
Next
From: Eric D
Date:
Subject: Re: [GENERAL] archive_command not being executed