Re: [sqlalchemy] Re: Read only property

2010-08-31 Thread Petr Kobalíček
Hi Mark, I think I badly described what I'm doing. My problem is that I need to update some columns atomically and I'm using stored procedures for that. I'm still learning the postgres so maybe I'm doing so complex things for so simple tasks. As a very short and simple example: RecordTable:

Re: [sqlalchemy] Re: Read only property

2010-08-30 Thread Petr Kobalíček
I have small question regarding the viewonly property. Can I assign viewonly to a column? In the SqlA example it's used together with relationship(), I need to mark viewonly just table column. For example: RecordTable = Table('t_record', metadata, Column('record_id', Integer, primary_key =

[sqlalchemy] Re: Read only property

2010-08-30 Thread Mark
Hi Petr, I think if you are the owner of the database schema, you can grant select, update, delete only to the columns that you want from MySQL/ Oracle/PostgreSQL/MS-SQL. I think this is something done on the database side of things, not in SQLAlchemy. I checked the documentation of SQLAlchemy

[sqlalchemy] Re: Read only property

2010-08-29 Thread Mark
Hi Petr, You may want to have a look at this link http://www.sqlalchemy.org/docs/mappers.html#building-query-enabled-properties Setting the viewonly=True property in your mapper configuration does exactly what you want. I've used it a couple of times in my own project and it works. -Mark On