(self)
| 1785 | ) |
| 1786 | |
| 1787 | def test_table_valued_one(self): |
| 1788 | assets_transactions = table( |
| 1789 | "assets_transactions", column("id"), column("contents", JSON) |
| 1790 | ) |
| 1791 | |
| 1792 | jb = func.jsonb_each(assets_transactions.c.contents).table_valued( |
| 1793 | "key", "value" |
| 1794 | ) |
| 1795 | |
| 1796 | stmt = select(assets_transactions.c.id, jb.c.key, jb.c.value).join( |
| 1797 | jb, true() |
| 1798 | ) |
| 1799 | |
| 1800 | self.assert_compile( |
| 1801 | stmt, |
| 1802 | "SELECT assets_transactions.id, anon_1.key, anon_1.value " |
| 1803 | "FROM assets_transactions " |
| 1804 | "JOIN jsonb_each(assets_transactions.contents) AS anon_1 ON true", |
| 1805 | ) |
| 1806 | |
| 1807 | def test_table_valued_two(self): |
| 1808 | """ |
nothing calls this directly
no test coverage detected