From: John R Pierce <pierce@hogranch.com>
To: pgsql-general@postgresql.org
Subject: Re: jsonb
Date: Tue, 14 Nov 2017 15:38:06 -0800
Message-ID: <7c21b041-2026-aebf-a695-51156521b35e@hogranch.com> (raw)
In-Reply-To: <CAMsqVxvpBPy5shgEaLqLY45mjEAdUBfijxQTFJuw0qHFdNc3wA@mail.gmail.com>
References: <CAMsqVxvckCZ1oXgs1xs2gkL6TKvjjeJ3vDQA+FQwv16jJSrT2g@mail.gmail.com>
<CAHyXU0wXzTvqBrmAu-Q86PG7mtD_+uJuOq7A+1v8AAxH9NtA1Q@mail.gmail.com>
<CAMsqVxvpBPy5shgEaLqLY45mjEAdUBfijxQTFJuw0qHFdNc3wA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: pierce@hogranch.com
Subject: Re: jsonb
In-Reply-To: <7c21b041-2026-aebf-a695-51156521b35e@hogranch.com>
References: <CAMsqVxvckCZ1oXgs1xs2gkL6TKvjjeJ3vDQA+FQwv16jJSrT2g@mail.gmail.com> <CAHyXU0wXzTvqBrmAu-Q86PG7mtD_+uJuOq7A+1v8AAxH9NtA1Q@mail.gmail.com> <CAMsqVxvpBPy5shgEaLqLY45mjEAdUBfijxQTFJuw0qHFdNc3wA@mail.gmail.com> <7c21b041-2026-aebf-a695-51156521b35e@hogranch.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox