(self)
| 443 | ) |
| 444 | |
| 445 | async def test_sql_dml_insert_18(self): |
| 446 | res = await self.scon.fetch( |
| 447 | ''' |
| 448 | WITH |
| 449 | a as (INSERT INTO "Child" (prop) VALUES ('a')), |
| 450 | b as (INSERT INTO "Child" (prop) VALUES ('b_0'), ('b_1')) |
| 451 | SELECT line FROM "Log" ORDER BY line; |
| 452 | ''' |
| 453 | ) |
| 454 | # changes to the database are not visible in the same query |
| 455 | self.assert_shape(res, 0, 0) |
| 456 | |
| 457 | # so we need to re-select |
| 458 | res = await self.squery_values('SELECT line FROM "Log" ORDER BY line;') |
| 459 | self.assertEqual( |
| 460 | res, |
| 461 | [ |
| 462 | ["inserted all"], |
| 463 | ["inserted each a"], |
| 464 | ["inserted each b_0"], |
| 465 | ["inserted each b_1"], |
| 466 | ], |
| 467 | ) |
| 468 | |
| 469 | async def test_sql_dml_insert_19(self): |
| 470 | # exclusive on base, then insert into base and child |
nothing calls this directly
no test coverage detected