MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_sql_expr_lastrowid

Method test_sql_expr_lastrowid

test/sql/test_insert_exec.py:637–647  ·  view source on GitHub ↗
(self, connection)

Source from the content-addressed store, hash-verified

635
636 @testing.requires.sql_expressions_inserted_as_primary_key
637 def test_sql_expr_lastrowid(self, connection):
638 # see also test.orm.test_unitofwork.py
639 # ClauseAttributesTest.test_insert_pk_expression
640 t = self.tables.foo_no_seq
641 self._test(
642 connection,
643 t.insert().values(id=literal(5) + 10, data="data", x=5),
644 (15, "data", 5),
645 inserted_primary_key=(15,),
646 table=self.tables.foo_no_seq,
647 )
648
649 def test_direct_params(self, connection):
650 t = self._fixture()

Callers

nothing calls this directly

Calls 4

_testMethod · 0.95
literalFunction · 0.90
valuesMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected