jika Anda menggunakan JSONB , Anda dapat menggunakan jsonb_set fungsi
(table
.update()
.values(views=func.jsonb_set(table.c.views,
'{%s}' % '1002',
1))
.where(...))
jika Anda memasukkan dari kolom lain
(table
.update()
.values(views=func.jsonb_set(table.c.views,
'{%s}' % '1002',
other_table.c.other_column.cast(String).cast(JSONB)))
.where(...))