Re: [sqlalchemy] Re: Dealing with readonly column

2023-04-18 Thread Jonathan Vanasco
FWIW, I often use the events to ensure an object or column is "read only". Sometimes I also will use two different attributes, where `Object.foo` is a getter for `Object._foo` in the database. The database will raise an error (hopefully) if I try to write to a 'protected column', and

Re: [sqlalchemy] Re: Dealing with readonly column

2023-04-14 Thread Mike Bayer
On Fri, Apr 14, 2023, at 3:02 PM, Lele Gaifax wrote: > "Mike Bayer" writes: > >> On Fri, Apr 14, 2023, at 8:03 AM, Lele Gaifax wrote: >>> I now have >>> >>> CREATE TABLE something (id SERIAL, name TEXT) >>> >>> CREATE FUNCTION counter(something) >>> RETURNS INTEGER AS $$ >>> SELECT