-
Notifications
You must be signed in to change notification settings - Fork 432
Commit 7d8361b
Allow using custom Record class
Add the new `record_class` parameter to the `create_pool()` and
`connect()` functions, as well as to the `cursor()`, `prepare()`,
`fetch()` and `fetchrow()` connection methods.
This not only allows adding custom functionality to the returned
objects, but also assists with typing (see #577 for discussion).
Fixes: #40.1 parent 39040b3 commit 7d8361b
File tree
17 files changed
+610
-106
lines changed- asyncpg
- _testbase
- protocol
- codecs
- record
- tests
17 files changed
+610
-106
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | - | ||
2 | + | ||
3 | 3 |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 | + | ||
22 | 23 |
| |
23 | 24 |
| |
24 | 25 |
| |
| |||
266 | 267 |
| |
267 | 268 |
| |
268 | 269 |
| |
270 | + | ||
269 | 271 |
| |
270 | 272 |
| |
271 | 273 |
| |
272 | 274 |
| |
273 | 275 |
| |
274 | 276 |
| |
275 | 277 |
| |
278 | + | ||
276 | 279 |
| |
277 | 280 |
| |
278 | 281 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
594 | 594 |
| |
595 | 595 |
| |
596 | 596 |
| |
597 | - | ||
598 | - | ||
597 | + | ||
598 | + | ||
599 | + | ||
600 | + | ||
601 | + | ||
602 | + | ||
603 | + | ||
604 | + | ||
605 | + | ||
606 | + | ||
599 | 607 |
| |
600 | 608 |
| |
601 | 609 |
| |
| |||
613 | 621 |
| |
614 | 622 |
| |
615 | 623 |
| |
616 | - | ||
624 | + | ||
617 | 625 |
| |
618 | 626 |
| |
619 | 627 |
| |
| |||
649 | 657 |
| |
650 | 658 |
| |
651 | 659 |
| |
652 | - | ||
660 | + | ||
653 | 661 |
| |
654 | 662 |
| |
655 | 663 |
| |
| |||
661 | 669 |
| |
662 | 670 |
| |
663 | 671 |
| |
664 | - | ||
665 | - | ||
666 | - | ||
672 | + | ||
673 | + | ||
674 | + | ||
675 | + | ||
676 | + | ||
677 | + | ||
678 | + | ||
679 | + | ||
667 | 680 |
| |
668 | 681 |
| |
669 | 682 |
| |
|
0 commit comments