Ok
I implementig the emulate sequence table in DBDatabaseDriver
rename default getNextSequenceValue in getNextSequenceValueImpl
=====================================
   private boolean emulateSequenceTable = false;
   private String emulateSequenceTableName = "Sequences";

   public boolean isEmulateSequenceTable() {
       return emulateSequenceTable;
   }

   public void setEmulateSequenceTable(boolean emulateSequenceTable) {
       this.emulateSequenceTable = emulateSequenceTable;
   }

   public String getEmulateSequenceTableName() {
       return emulateSequenceTableName;
   }

public void setEmulateSequenceTableName(String emulateSequenceTableName) {
       this.emulateSequenceTableName = emulateSequenceTableName;
   }

public Object getNextSequenceValue(DBDatabase db,String seqName, int minValue, Connection conn){
       //check if emulated
       if (emulateSequenceTable)
{ // Use a sequence Table to generate Sequences DBSeqTable table = (DBSeqTable)db.getTable(emulateSequenceTableName);
           if (table == null) {
               table = new DBSeqTable(emulateSequenceTableName, db);
           }
return table.getNextValue(seqName, minValue, conn);
       }else {
           return getNextSequenceValueImpl(db, seqName, minValue, conn);
       }
   }
================================


Francis De Brabandere ha scritto:
Rainer, what do you think about these ideas?

Frank, could you create an issue for the second question (non-pk auto inc)?

On Fri, Mar 27, 2009 at 11:32 AM, Frank Lupo <[email protected]> wrote:
The (DataType.AUTOINC) sequence has emulated using getRecordDefaultValue in
DBTableColumn is a good idea.
If using serial the value are insert in automatic mode on postgresql.
My idea is create a new dataType DataType.AUTOINC_NATIVE.

Second question...
I have create a column "version" DataType.AUTOINC no primarykey column.
If update record AUTOINC is not update.
In my opinion if column is not a primarykey the AUTOINC column must be
updated.


Francis De Brabandere ha scritto:
I'll have a look at all these issues this weekend, but if you have it
all fixed locally can you post a patch on jira?

2009/3/27 Frank Lupo <[email protected]>:

Hi,
current datatype auto_inc in postgresql definition create a separate
sequence.
Why is not used serial type in postgresql?

Best regards


--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP
autenticato? GRATIS solo con Email.it http://www.email.it/f

Sponsor:
Con Poker Club anche a Marzo il montepremi č garantito: ogni lunedě,
giovedě
e domenica vinci fino a 25.000 !
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=8806&d=27-3



 ------------------------------------------------------------------------


Nessun virus nel messaggio in arrivo.
Controllato da AVG - www.avg.com Versione: 8.0.238 / Database dei virus:
270.11.29/2024 -  Data di rilascio: 03/26/09 07:12:00




--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP
autenticato? GRATIS solo con Email.it http://www.email.it/f

Sponsor:
Gioca con Poker Club! Scegli il torneo che fa per te, ogni settimana puoi
vincere oltre 240.000 EURO!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=8805&d=27-3




------------------------------------------------------------------------


Nessun virus nel messaggio in arrivo.
Controllato da AVG - www.avg.com Versione: 8.0.238 / Database dei virus: 270.11.30/2026 - Data di rilascio: 03/27/09 07:13:00





--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP 
autenticato? GRATIS solo con Email.it http://www.email.it/f

Sponsor:
Apre VideoAnnunciLavoro.net: dove domanda ed offerta di lavoro hanno una marcia 
in piů. Se credi in te stesso fatti vedere! č gratuito
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=8863&d=31-3

Reply via email to