Return a :term:`plugin-enabled` description of the columns which this DML construct is RETURNING against, in other words the expressions established as part of :meth:`.UpdateBase.returning`. This attribute is generally useful when using the ORM, as an extended struct
(self)
| 958 | |
| 959 | @property |
| 960 | def returning_column_descriptions(self) -> List[Dict[str, Any]]: |
| 961 | """Return a :term:`plugin-enabled` description of the columns |
| 962 | which this DML construct is RETURNING against, in other words |
| 963 | the expressions established as part of :meth:`.UpdateBase.returning`. |
| 964 | |
| 965 | This attribute is generally useful when using the ORM, as an |
| 966 | extended structure which includes information about mapped |
| 967 | entities is returned. The section :ref:`queryguide_inspection` |
| 968 | contains more background. |
| 969 | |
| 970 | For a Core statement, the structure returned by this accessor is |
| 971 | derived from the same objects that are returned by the |
| 972 | :attr:`.UpdateBase.exported_columns` accessor:: |
| 973 | |
| 974 | >>> stmt = insert(user_table).returning(user_table.c.id, user_table.c.name) |
| 975 | >>> stmt.entity_description |
| 976 | [ |
| 977 | { |
| 978 | "name": "id", |
| 979 | "type": Integer, |
| 980 | "expr": Column("id", Integer(), table=<user>, ...) |
| 981 | }, |
| 982 | { |
| 983 | "name": "name", |
| 984 | "type": String(), |
| 985 | "expr": Column("name", String(), table=<user>, ...) |
| 986 | }, |
| 987 | ] |
| 988 | |
| 989 | .. versionadded:: 1.4.33 |
| 990 | |
| 991 | .. seealso:: |
| 992 | |
| 993 | :attr:`.UpdateBase.entity_description` |
| 994 | |
| 995 | :attr:`.Select.column_descriptions` - entity information for |
| 996 | a :func:`.select` construct |
| 997 | |
| 998 | :ref:`queryguide_inspection` - ORM background |
| 999 | |
| 1000 | """ # noqa: E501 |
| 1001 | meth = DMLState.get_plugin_class( |
| 1002 | self |
| 1003 | ).get_returning_column_descriptions |
| 1004 | return meth(self) |
| 1005 | |
| 1006 | |
| 1007 | class ValuesBase(UpdateBase): |
nothing calls this directly
no test coverage detected