[Twisted-Python] serial datatype in t.e.row
sean at twistedmatrix.com
Sun Sep 15 13:43:23 EDT 2002
where the reload arg specifies if the key value should be "reloaded" from
the database. this would be specified by the user if they are going to
perform more operations on the row object that was just inserted.
From: twisted-python-admin at twistedmatrix.com
[mailto:twisted-python-admin at twistedmatrix.com]On Behalf Of Benjamin
Sent: Friday, September 13, 2002 5:09 AM
To: twisted-python at twistedmatrix.com
Subject: Re: [Twisted-Python] serial datatype in t.e.row
> One solution may be to manually run a
> SELECT nextval('sequencename')
> to get the next value and use that for the insert, but this requires an
> extra step for each insert, and requires that the we know which tables
> serial columns (suprisingly hard to figure out..) and makes the behavior
> tables with serial columns and no serial columns very different.
Wouldn't it be sufficient to add a "reload hint", or something? its only
INSERT that will be affected. A reloadoninsert-hint would be
database-implementationindependent as well. The difference between
getting the whole table or just the ID is neglible in most cases; or
maybe even a question on wheter serials on anything but the dbKeyColumns
should be allowed to contain serials.
At least on postgresql there can be stuff happening on the server that
client would never be able to know about. Letting it reload could also
be passed as an option to every databaseinteractionmethod.
The reloading itself could be done through the deferred, just as glyph
Twisted-Python mailing list
Twisted-Python at twistedmatrix.com
More information about the Twisted-Python