Sequence doesnt map super-great either since you can also execute a Sequence by itself using its execute() method....but it is a nice place to put the start value/auto-increment.

having failing unit tests is a requirement for pretty much every database there is since no DB that supports every behavior; thats why we have the "@unsupported" decorator in the unittests.  

I cant see when the "SET IDENTITY_INSERT" trick would be appropriate; since SA is literally going to turn it on and off for individual rows which probably obliterates performance, and i would think it blows away any hope of proper concurrent behavior as well (unless the once-per-table restriciton is only per-connection?).  

which basic unit tests fail if we just get rid of "SET IDENTITY_INSERT" ?   if those unit tests just need a "Sequence" added to the appropriate columns thats fine; Oracle has the same issue.


On Sep 11, 2006, at 10:16 AM, Rick Morrison wrote:

The column definition in MSSQL already allows the specification of an IDENTITY column by using the Sequence() class; see the MSSQL module header docstring for some details.

Getting rid of the auto-magic IDENTITY_INSERT on/off should be easy, but it will make several basic unit tests fail -- maybe making that behavior switchable w/b better?

Rick


On 9/11/06, Michael Bayer <[EMAIL PROTECTED]> wrote:

On Sep 10, 2006, at 9:55 PM, Rick Morrison wrote:
> Oh, it gets even better. You can only have IDENTITY_INSERT on for
> one table at a time. Trying to set it on for another table while it
> is set on elsewhere will throw an error. It is necessary to turn it
> off first, then set it on for the other table.
>

Ok the "IDENTITY_INSERT" is only when you are inserting an *explicit*
value into an IDENTITY column, right ?  i would rather just allow
users to choose IDENTITY or not, using a flag on Column such as
"autoincrement=True".  obviously it defaults to True right now, but
for databases that cant handle switching (like ms-sql), you can turn
it off and get a non-IDENTITY column.  lets take that SET
IDENTITY_INSERT stuff out, thats not going to scale at all; it
appears that its intended for batch loads and isnt really appropriate
within an application flow.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Sqlalchemy-users mailing list

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to