RE: [SQLObject] request for elaboration on code
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Luke O. <lu...@me...> - 2004-02-16 16:51:08
|
>> There are alternatives to doing it by oid, such as pre-selecting the > nextval >> on the sequence, but using oids seemed to be the least intrusive to >> SQLObject's design. > > I think it would be reasonable to either derive the standard sequence name > as you described or accept it in the class definition like _seqName or > similar. Nextval could then operate in the (somewhat)same way( that we are > currently using oid. Is there organizational resistance to doing it that > way? > > In other words, if I do it myself, will it be accepted into the project? I don't see any organizational resistance to it. The only reason an alternate PostgresConnection (PostgresSeqConnection?) would be problematic is if it altered the signature of _queryInsertID. That's why a style-derived system will be easiest. (This means that the special case ones where _seqName would be necessary still won't be feasible.) Just so we're on the same page, _queryInsertID in this version will: if not id: select nextval | create insert SQL | execute insert - Luke |