On Wednesday 08 March 2006 16:48, Michael Bayer wrote:
> On Mar 8, 2006, at 4:38 PM, Robert E. Anderson wrote:
> > On Wed March 8 2006 15:54, Michael Bayer wrote:
> > > python test/engines.py --db oracle
> >
> > Thanks. With that hint I found "--dburi oracle://..." seems to get
> > me further though!
>
> wow, i didnt even know that option was there, OK.
>
> > I'll have to look a little more at the results but I believe my I'm
> > failing some of these due to table name case?
>
> Ive been chasing down other issues today...are you testing with the
> oracle.py thats checked in or have you made some changes?
I was using the released 0.1.3 version, but I just checked out the latest SVN
and somebody has been busy, since most of what I worked on seems to be
already be included now. I'll try to look at the differences and see if I
have anything to offer. More likely I'll learn a little more by reading the
new code!
I did have a few more ischema_names defined at least some of them are correct:
'FLOAT' : OracleNumeric,
'TIMESTAMP' : OracleDateTime,
'CHAR' : OracleChar,
> > I wonder why there must be a "default" OR "sequence" defined for
> > table creation? Seems like it would make more sense to ensure that
> > a value is given on insertion. I would think the constaints should
> > determine if it's a violation of the constaints?
>
> you dont have to have a default or a sequence on a particular
> table. if you insert a row missing a primary key and theres no
> default, sequence, or built-in ID generator (like sqlite has) you
> will get a constraint error from the database, just like you
> describe. however, SQLAlchemy tries to take the best advantage it
> possibly can of the various methods of auto-creating primary key
> values, and since the other three major databases supported
> (postgres, mysql, sqlite) include such methods, it uses them when it
> declares a primary key column. a non-NULL primary key value continues
> to be useable as it overrides defaults/sequences/etc.
>
> Oracle on the other hand doesnt have any "automatic primary key" type
> of feature, so the user is encouraged to make sequences for tables,
> but its definitely not needed (unless theres a bug im unaware of).
My problem may be with my test cases. At first I thougt is might be that one
of my PK id's was 0. But can now see that I have a self referencing code
table that seems to cause errors in Oracle. I'll look at it more tomorrow.
I got familiar with SA in sqlite and I'm now attempting to write a python
script that simply uses toengine to convert sqlite autoloaded tables, then a
for loop to transfer over the data. But I may just have constraint'ed myself
into a corner and sqlite just didn't enforce them.
--
--------------------------------------------------------------
Robert E. Anderson email: [EMAIL PROTECTED]
Systems Programmer phone: (603) 862-3489
UNH Research Computing Center fax: (603) 862-1761
--------------------------------------------------------------
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users