MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / A

Class A

test/ext/test_indexable.py:26–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24 Base = declarative_base()
25
26 class A(Base):
27 __tablename__ = "a"
28 id = Column("id", Integer, primary_key=True)
29 array = Column("_array", ARRAY(Integer), default=[])
30 first = index_property("array", 0)
31 tenth = index_property("array", 9)
32
33 a = A(array=[1, 2, 3])
34 eq_(a.first, 1)

Callers 5

test_arrayMethod · 0.70
test_array_longinitMethod · 0.70
test_set_immutableMethod · 0.70

Calls 3

ColumnClass · 0.90
ARRAYClass · 0.90
index_propertyClass · 0.90

Tested by 5

test_arrayMethod · 0.56
test_array_longinitMethod · 0.56
test_set_immutableMethod · 0.56