PeterHenell / sql-server-data-producer

Automatically exported from code.google.com/p/sql-server-data-producer
0 stars 1 forks source link

Idea: Have each generator hold its own N #110

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Problem example:
When generating rows with datetime columns and i want the first date to be the 
2012-01-01. The problems shows itself when this row is owned by the second 
table to be inserted, or later. 
Then this column will use N = 2 or higher, and then the date will start from 
2012-01-02 or later.

An idea would be to have every generator keep their own N, or each group of 
Generator type. DateTime generators would have one N and IntGenerators would 
have another N.

Original issue reported on code.google.com by a03pe...@gmail.com on 5 Dec 2012 at 12:38

GoogleCodeExporter commented 9 years ago

Original comment by a03pe...@gmail.com on 5 Dec 2012 at 1:32

GoogleCodeExporter commented 9 years ago
An option to use "Local" or "Global" N?

Original comment by a03pe...@gmail.com on 17 Dec 2012 at 9:36

GoogleCodeExporter commented 9 years ago
Each generator now have their own SetCounter as N.
Using the parameter-less version of GenerateValue will use the internal counter.
There exist a ResetCounter method on each generator to reset the counter before 
running anything.

Original comment by m...@peterhenell.se on 21 Jan 2014 at 3:45