empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Döbele (JIRA) <empire-db-...@incubator.apache.org>
Subject [jira] [Resolved] (EMPIREDB-198) AUTO Increment: Can we have a table based functionality to get auto incremented value.
Date Sun, 24 Nov 2013 17:13:36 GMT

     [ https://issues.apache.org/jira/browse/EMPIREDB-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rainer Döbele resolved EMPIREDB-198.
------------------------------------

    Resolution: Not A Problem

Yes you can - and depending on which database you are using, it might already be there or
you will have to implement it.
The decision how sequence values are generated is the responsibility of the Driver - i.e.
the class derived from DBDatabaseDriver that you use to open a database.
Some drivers may acutally give you a choice which method to use like e.g. the Microsoft SQL
Server driver (DBDatabaseDriverMSSQL). It allows you to either use identity columns (default)
or to use a dedicated table for sequence generation. It is decided by the property “useSequenceTable”
that you can set before opening a database. If it is set to true then – by default – a
sequence table (see DBDatabaseDriver.DBSeqTable) is used.
So please check whether the database driver you are using already provides this feature. If
not you can easily create your own driver class by using your desired driver as the superclass
and override the corresponding methods in order to use a sequence table (best to copy everything
from DBDatabaseDriverMSSQL).

> AUTO Increment: Can we have a table based functionality to get auto incremented value.
> --------------------------------------------------------------------------------------
>
>                 Key: EMPIREDB-198
>                 URL: https://issues.apache.org/jira/browse/EMPIREDB-198
>             Project: Empire-DB
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: empire-db-2.4.2
>            Reporter: Siddhartha Upadhyaya
>            Assignee: Rainer Döbele
>
> Can we have an auto increment value based on some table based implementation ?
> Say we will have a AUTOKey table, which will contain the next unique value for the AUTOINC
column. During initialization of the new record, the value will get auto populated and the
field will be marked as read only to avoid any modification.
> The AutoKey table can also provide some prefix / suffix facility. Which will be appended
with the unique number. 



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message