Return a description of relation attributes (columns). :return: A tuple of :class:`asyncpg.types.Attribute`. Example:: st = await self.con.prepare(''' SELECT typname, typnamespace FROM pg_type ''') print(st.get_attributes())
(self)
| 77 | |
| 78 | @connresource.guarded |
| 79 | def get_attributes(self): |
| 80 | """Return a description of relation attributes (columns). |
| 81 | |
| 82 | :return: A tuple of :class:`asyncpg.types.Attribute`. |
| 83 | |
| 84 | Example:: |
| 85 | |
| 86 | st = await self.con.prepare(''' |
| 87 | SELECT typname, typnamespace FROM pg_type |
| 88 | ''') |
| 89 | print(st.get_attributes()) |
| 90 | |
| 91 | # Will print: |
| 92 | # (Attribute( |
| 93 | # name='typname', |
| 94 | # type=Type(oid=19, name='name', kind='scalar', |
| 95 | # schema='pg_catalog')), |
| 96 | # Attribute( |
| 97 | # name='typnamespace', |
| 98 | # type=Type(oid=26, name='oid', kind='scalar', |
| 99 | # schema='pg_catalog'))) |
| 100 | """ |
| 101 | return self._state._get_attributes() |
| 102 | |
| 103 | @connresource.guarded |
| 104 | def cursor(self, *args, prefetch=None, |
no outgoing calls