MCPcopy Create free account
hub / github.com/piccolo-orm/piccolo / test_index

Method test_index

tests/columns/test_array.py:54–62  ·  view source on GitHub ↗

Indexes should allow individual array elements to be queried.

(self)

Source from the content-addressed store, hash-verified

52
53 @engines_skip("sqlite")
54 def test_index(self):
55 """
56 Indexes should allow individual array elements to be queried.
57 """
58 MyTable(value=[1, 2, 3]).save().run_sync()
59
60 self.assertEqual(
61 MyTable.select(MyTable.value[0]).first().run_sync(), {"value": 1}
62 )
63
64 @engines_skip("sqlite")
65 def test_all(self):

Callers

nothing calls this directly

Calls 6

saveMethod · 0.80
assertEqualMethod · 0.80
selectMethod · 0.80
MyTableClass · 0.70
run_syncMethod · 0.45
firstMethod · 0.45

Tested by

no test coverage detected