On 12/6/06, John Siracusa <[EMAIL PROTECTED]> wrote: > Through judicious commenting-out, I've got RDBO passing 479 of the roughly > 800 possible Oracle tests in t/db-object-manager.t. Basically, limit/offset > works as requested by Kevin earlier. To do this, I did the minimum work > needed to get t/db-object-manager.t to run at all, which included some quick > and dirty NLS_*_FORMAT stuff that I'm sure I'll have to revisit. > > I'm not sure how much Oracle work I'll do before the next release because I > think it'll be soon. Here's something for the Oracle folks to think about > in the meantime. What should be the semantic equivalent of SERIAL or > AUTO_INCREMENT columns in RDBO when using Oracle? Ideally, it should "just > work" the same way that it does in all the existing supported databases.
Sadly, it does not. What you is usually done is: 1. have a primary key column of type integer (or number) 2. create a sequence called <tablename>_seq 3. get the next value "select <tablename>_seq.nextval from dual" or "insert into <tablename> values (<tablename>_seq.nextval, 'foo',1)" 4. possibly implement a before_insert trigger to populate the PK value with the next number in the sequence. Postgres does the exact same thing for it's SERIAL type except it sets up the sequence and (I'm assuming) a trigger for you. Literature: http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:500421805606 http://thinkoracle.blogspot.com/2006/02/oracle-sequences.html - Clayton ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object