We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 107fe18 commit 9d27decCopy full SHA for 9d27dec
tests/columns/test_jsonb.py
@@ -58,3 +58,18 @@ def test_arrow_where(self):
58
self.assertEqual(
59
MyTable.count().where(MyTable.json.arrow("a") == "2").run_sync(), 0
60
)
61
+
62
+ def test_arrow_first(self):
63
+ """
64
+ Make sure the arrow function can be used with the first clause.
65
66
+ MyTable.insert(
67
+ MyTable(json='{"a": 1}'), MyTable(json='{"b": 2}'),
68
+ ).run_sync()
69
70
+ self.assertEqual(
71
+ MyTable.select(MyTable.json.arrow("a").as_alias("json"))
72
+ .first()
73
+ .run_sync(),
74
+ {"json": "1"},
75
+ )
0 commit comments