MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_scalars

Method test_scalars

test/engine/test_execute.py:257–268  ·  view source on GitHub ↗
(self, connection)

Source from the content-addressed store, hash-verified

255 eq_(res, "sandy")
256
257 def test_scalars(self, connection):
258 conn = connection
259 users = self.tables.users
260 conn.execute(
261 users.insert(),
262 [
263 {"user_id": 1, "user_name": "sandy"},
264 {"user_id": 2, "user_name": "spongebob"},
265 ],
266 )
267 res = conn.scalars(select(users.c.user_name).order_by(users.c.user_id))
268 eq_(res.all(), ["sandy", "spongebob"])
269
270 @testing.combinations(
271 ({"user_id": 1, "user_name": "name1"},),

Callers

nothing calls this directly

Calls 7

selectFunction · 0.90
eq_Function · 0.90
executeMethod · 0.45
insertMethod · 0.45
scalarsMethod · 0.45
order_byMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected