Is there any hints on how to use (if supported) the postgresql json array support?
I'm a bit at a loss as to how to approach translating something like the following to python/sql getting a dictionary list appended to each returned row:
select fy.id, fy.name, fy.date_start, fy.date_stop, ( select array_to_json(array_agg(row_to_json(x))) from ( select j.type, s.name, s.number_next, s.padding, s.prefix from account_journal j join account_sequence_fiscalyear s_fy on s_fy.fiscalyear_id = fy.id join ir_sequence s on s.id = s_fy.sequence_idwhere j.sequence_id = s_fy.sequence_main_id and j.type in ('sale', 'sale_refund', 'purchase', 'purchase_refund')) x ) "invoice_sequences" from account_fiscalyear fy order by fy.id asc
can't seem to easily find any pertinent examples using sql arrays or json data with python-sql... Is this feasible with python/sql without resorting to a raw psycopg2 execute statement? cheers, -- Richard PALO -- You received this message because you are subscribed to the Google Groups "python-sql" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
