You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Real life case - i do not know why it not exists in every database ;-)
Many times we need to have numbered documents.
Documents can be grouped by Kind, departments, month and any other criteria
Now when we need generate in concurrent environment values for such documents and we must do some trick and elimination of conflicts.
Whe have possible ways:
1) create generators with name like GEN_SCAN_DEP1_2014_01, GEN_SCAN_DEP1_2014_02, GEN_SCAN_DEP1_2014_03 .. GEN_SCAN_DEP2_2014_01, GEN_SCAN_DEP2_2014_02 ...
2) create table with numbers - but here we need elimination of conflicts
3) very old way Select max().. - and also we need elimination of conflicts
...
will be good to have posibility to create parameterized generator
below the idea
may be this can be supported in very clear way
CREATE GENERATOR GEN_FOR_SCAN(DEPART INTEGER, YEAR INTEGER, MONTH INTEGER);
GEN_ID(GEN_FOR_SCAN[DEPART=1, YEAR=2014, MONTH=1], 1);
The text was updated successfully, but these errors were encountered:
and in memory of FB process should be simple dictionary with values for each complex generator
and acces to this dictionary should be protected by mutex like i suppose is now for normal generator
i suppose that this is simple to provide
pity that I do not know C ++ :(
This is one day for coding - and benefit will be very big :)
Submitted by: @livius2
Real life case - i do not know why it not exists in every database ;-)
Many times we need to have numbered documents.
Documents can be grouped by Kind, departments, month and any other criteria
Now when we need generate in concurrent environment values for such documents and we must do some trick and elimination of conflicts.
Whe have possible ways:
1) create generators with name like GEN_SCAN_DEP1_2014_01, GEN_SCAN_DEP1_2014_02, GEN_SCAN_DEP1_2014_03 .. GEN_SCAN_DEP2_2014_01, GEN_SCAN_DEP2_2014_02 ...
2) create table with numbers - but here we need elimination of conflicts
3) very old way Select max().. - and also we need elimination of conflicts
...
will be good to have posibility to create parameterized generator
below the idea
CREATE GENERATOR GEN_FOR_DOC(INTEGER)
GEN_ID(GEN_FOR_DOC[1], 1);
CREATE GENERATOR GEN_FOR_SCAN(INTEGER, INTEGER, INTEGER)
GEN_ID(GEN_FOR_SCAN[1, 2014, 1], 1); //department 1, year 2014, month 1
may be this can be supported in very clear way
CREATE GENERATOR GEN_FOR_SCAN(DEPART INTEGER, YEAR INTEGER, MONTH INTEGER);
GEN_ID(GEN_FOR_SCAN[DEPART=1, YEAR=2014, MONTH=1], 1);
The text was updated successfully, but these errors were encountered: