Skip to content

Commit 1429658

Browse files
committed
Fix invalid values call for update statement
The previous statement generated a `BindParameter` that could not be serialized to JSON. This change switches to a Tuple that gets serialized successfully. It throwed a `TypeError` when trying to serialize
1 parent 0038451 commit 1429658

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/crate/client/sqlalchemy/tests/dict_test.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,7 @@ def test_update_with_dict_column(self):
9898
mytable = self.mytable
9999
stmt = mytable.update().\
100100
where(mytable.c.name == 'Arthur Dent').\
101-
values({
102-
"data['x']": "Trillian"
103-
})
101+
values({mytable.c.data['x']: "Trillian"})
104102
self.assertSQL(
105103
"UPDATE mytable SET data['x'] = ? WHERE mytable.name = ?",
106104
stmt

0 commit comments

Comments
 (0)