(self)
| 374 | ) |
| 375 | |
| 376 | async def test_sql_dml_insert_17a(self): |
| 377 | # default values |
| 378 | |
| 379 | await self.scon.execute( |
| 380 | ''' |
| 381 | INSERT INTO "Document" DEFAULT VALUES; |
| 382 | ''' |
| 383 | ) |
| 384 | |
| 385 | await self.scon.execute( |
| 386 | ''' |
| 387 | INSERT INTO "Document" (id, title) VALUES (DEFAULT, 'Report'); |
| 388 | ''' |
| 389 | ) |
| 390 | res = await self.squery_values('SELECT title FROM "Document"') |
| 391 | self.assert_data_shape(res, tb.bag([[None], ['Report (new)']])) |
| 392 | |
| 393 | await self.scon.execute( |
| 394 | ''' |
| 395 | INSERT INTO "Document" (title) VALUES ('Report2'), (DEFAULT); |
| 396 | ''' |
| 397 | ) |
| 398 | res = await self.squery_values('SELECT title FROM "Document"') |
| 399 | self.assert_data_shape( |
| 400 | res, |
| 401 | tb.bag([ |
| 402 | [None], |
| 403 | [None], |
| 404 | ['Report (new)'], |
| 405 | ['Report2 (new)'], |
| 406 | ]), |
| 407 | ) |
| 408 | |
| 409 | await self.scon.execute( |
| 410 | ''' |
| 411 | INSERT INTO "Post" (title) VALUES ('post'), (DEFAULT); |
| 412 | ''' |
| 413 | ) |
| 414 | res = await self.squery_values('SELECT title FROM "Post"') |
| 415 | self.assert_data_shape( |
| 416 | res, |
| 417 | tb.bag([ |
| 418 | ['post'], |
| 419 | ['untitled'], |
| 420 | ]), |
| 421 | ) |
| 422 | |
| 423 | async def test_sql_dml_insert_17b(self): |
| 424 | # more default values |
nothing calls this directly
no test coverage detected