This is a bit of an odd request, but here goes:

A table in postgresql has some columns with sensitive data which should be 
secured against visibility by one of our applications (we use a central 
SqlAlchemy model for multiple applications)

Currently we use an environment var to determine if the column is in the 
class definition for the table (nesting the column in an "if" statement).  

A new feature I'd like to implement is allowing one of the applications to 
search on that column, but ensuring that it doesn't appear in the result.

currently we have this:

    class Foo(Base):
        __tablename__ = 'foo'
        id = sa_Column(sa_Integer, primary_key=True)
        if allow_bar:
            bar = sa_Column(sa_Text)
     
and it would be ideal to allow `bar` to be used in filter() queries, but 
never retrieved and exceptions raised if accessed.

has anyone tried to do something like this before?


-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

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+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to