خرید بک لینک

Vote count: 0

I would like to figure out how to use Postgres' (9.2) row_to_json with SqlAlchemy. However I haven't been able to come up with any working syntax.

details_foo_row_q = select([
    Foo.bar_id,
    Foo.id,
    Foo.x,
    Foo.ts,
    Foo.velocity,
    Foo.y,
]).where(Foo.alert_id == Bar.id
).alias('details_foo_row_q')

details_foo_q = select([
    func.row_to_json(details_foo_row_q).label('details')
]).where(details_foo_row_q.c.bar_id == Bar.id
).alias('details_foo_q')

Thank you for any clues

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 15 ارديبهشت 1395 ساعت: 0:14

صفحه بندی