From: Scott C. <sc...@sc...> - 2010-08-10 18:16:09
|
Hi Sven, The adaptor's nextoid method doesn't modify the sequence at all during run time; that is just incrementing the value that is stored in memory while it is running. It's only after data has been successfully written to the database that the adaptor goes back and updates the sequences with the values it's used (with the update_sequences method). The incrementing you are seeing is a side affect of the adaptor determining if the current value in the sequence is valid compared to the data in the table (in case some other program behaves in a less friendly way and inserts data into the table without updating the sequence). Scott On Tue, Aug 10, 2010 at 1:50 PM, Sven Heinicke <sv...@ge...> wrote: > Perhaps I'm using it wrong, but I was trying to use > Bio::GMOD::DB::Adapter to get the nextval of things. When I call it > more then once in a program in only seems to increment the sequence > once. Perhaps there is a method to alter the sequence when I'm done? > > $adapter->nextoid('organism', '++'); > $adapter->nextoid('organism', '++'); > > gives off correct values but the postgresql organism_organism_id_seq is > only incremented once. > > Sven > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > Gmod-devel mailing list > Gmo...@li... > https://lists.sourceforge.net/lists/listinfo/gmod-devel > -- ------------------------------------------------------------------------ Scott Cain, Ph. D. scott at scottcain dot net GMOD Coordinator (http://gmod.org/) 216-392-3087 Ontario Institute for Cancer Research |