MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_orm_query_classic_style

Function test_orm_query_classic_style

examples/performance/short_selects.py:68–72  ·  view source on GitHub ↗

classic ORM query of the full entity, no cache

(n)

Source from the content-addressed store, hash-verified

66
67@Profiler.profile
68def test_orm_query_classic_style(n):
69 """classic ORM query of the full entity, no cache"""
70 session = Session(bind=engine)
71 for id_ in random.sample(ids, n):
72 session.query(Customer).filter(Customer.id == id_).one()
73
74
75@Profiler.profile

Callers

nothing calls this directly

Calls 4

queryMethod · 0.95
SessionClass · 0.90
oneMethod · 0.45
filterMethod · 0.45

Tested by

no test coverage detected