[web2py] Re: DAL: INSERT-query's devilry

2015-03-16 Thread Val K
OK pydal.py/base.py: TABLE_ARGS=set((... , 'insert_with_returning')) pydal.py/objects.py: class Table(object): ... def __init__(...): ... self._insert_with_returning=args.get('insert_with_returning', True) ... pydal.py/adapters/postgres.py: def

[web2py] Re: DAL: INSERT-query's devilry

2015-03-14 Thread Massimo Di Pierro
Can you tell us about the fix? On Friday, 13 March 2015 16:30:39 UTC-5, Val K wrote: Thanks for your reply! You are right, if we are talking about some application with full built-in logic and it would like to be independent on any DBEngine. But IMHO there are a lot of opposite situations:

[web2py] Re: DAL: INSERT-query's devilry

2015-03-13 Thread Val K
Thanks for your reply! You are right, if we are talking about some application with full built-in logic and it would like to be independent on any DBEngine. But IMHO there are a lot of opposite situations: DB-App with many different clients. In this case VIEW is very helpful solution, it

[web2py] Re: DAL: INSERT-query's devilry

2015-03-12 Thread Niphlod
IMHO inserting to a view shouldn't be supported at all. On Thursday, March 12, 2015 at 12:18:10 AM UTC+1, Val K wrote: OK guys! My concrete suggestion: - Add attrubute _insert_with_returning to Table class - Fix adapter Postgres.py : def _insert(self, table, fields):

[web2py] Re: DAL: INSERT-query's devilry

2015-03-11 Thread Val K
OK guys! My concrete suggestion: - Add attrubute _insert_with_returning to Table class - Fix adapter Postgres.py : def _insert(self, table, fields): table_rname = table.sqlsafe if fields: keys = ','.join(f.sqlsafe_name for f, v in fields)