Documentation
¶
Overview ¶
Package generator provides pgtype specific value generators. Generation is driven by the pseudo-random number generator from `math/rand`. This allows for deterministic value generation, using a seed for each constructor. Note that this determinism is also affected by other parameters, such as a minimum or maximum value.
Each constructor also takes an argument for percentage of probability for a SQL null with each newly generated value. If the probability is 0 or lower, random null generation is disabled. Use this mode for columns with constraint NOT NULL. If the probability is 100 or higher, only nulls are generated.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Value ¶
type Value interface { pgtype.ValueTranscoder // NextValue populates the Value with a newly generated value. NextValue() }
Value generates a pgtype value on each read access.