Access other columns in a custom type

39 views
Skip to first unread message

Hussein Samadi

unread,
Apr 13, 2023, 6:10:56 AM4/13/23
to sqlalchemy
Hi everyone.
I'm creating a new SQLA custom type using TypeDecorator base class. Is it possible to have access to the value of other fields in "process_result_value" method? Generally, is it possible to create a custom type that have access to other column's data in the de-serialization process?

Thank you

Mike Bayer

unread,
Apr 13, 2023, 10:51:21 AM4/13/23
to noreply-spamdigest via sqlalchemy


On Thu, Apr 13, 2023, at 6:10 AM, Hussein Samadi wrote:
Hi everyone.
I'm creating a new SQLA custom type using TypeDecorator base class. Is it possible to have access to the value of other fields in "process_result_value" method? Generally, is it possible to create a custom type that have access to other column's data in the de-serialization process?

not at all, you would need to approach your problem at a different level.



Thank you


--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
 
 
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages