Thank you very much!
W dniu piątek, 15 czerwca 2018 02:43:08 UTC+2 użytkownik Mike Bayer napisał:
>
> On Thu, Jun 14, 2018 at 11:25 AM, Maciek Olko > wrote:
> > Hello,
> > I'm having difficulty in expressing such PostgreSQL code in SQLAlchemy:
> >
&
Here is what I have for now:
sa.func.string_agg(sa.select([('jsonb_array_elements')['{}'].astext]).select_from(sa.select([
sa.func.jsonb_array_elements(c.acc_licence_plates)])), ' / ')
But it's wrong.
Regards,
Maciej
czw., 14 cze 2018 o 17:25 użytkownik Ma
Hello,
I'm having difficulty in expressing such PostgreSQL code in SQLAlchemy:
select string_agg(test::jsonb#>>'{}', ' / ') from (select
jsonb_array_elements('["raz","dwa"]') as test) as foo;
At the end I'd like to have reference to real JSON column value (which is
guaranteed to be JSON array) in