This is usually done in the ORM with functions, and possibly hybrids.
See https://docs.sqlalchemy.org/en/14/orm/mapped_attributes.html
On Tuesday, August 9, 2022 at 1:55:45 PM UTC-4 Justvuur wrote:
> Hi there,
>
> Is there a way to pass/access model data for a row within the "
>
I think you misunderstand `exists()` in SQLAlchemy and SQL. `exists()` is
a convenience function to create a SQL `EXISTS` clause, which is an
operator used for filtering subqueries.
The 'from_exists' is just a subquery. It is supposed to be used within a
query which would then limit the
Hi there,
When creating another column property in a model that makes use of the
exists(), I noticed that the exists does a "select *".
*For example, the form exists below:*
class Contact(ResourceMixin, db.Model):
__tablename__ = 'contacts'
form_contacts = db.relationship(FormContact,
Hi there,
Is there a way to pass/access model data for a row within the "
process_result_value" method of a TypeDecorator?
For example, I want to decrypt the value but only if another value in the
same model row is true/false.
Regards,
Justin
--
SQLAlchemy -
The Python SQL Toolkit and