@Integer()

New in 2.0

Generate random integer values (4 bytes)

Data TypesSince 2.0.0

Parameters

NameTypeRequiredDefaultDescription
minInteger0Minimum value, default 0
maxInteger2147483647Maximum value, default 2147483647
nullSamplerStringThe null ratio, such as "1:2", indicates that generating a random value 3 times with an average of 1 time is null

Usage

@Integer(nullWeight)

Generate random integer between 0 and 2147483647 with null ratio

Example:
@Integer("1:2")
Output:
8760182237null
@Integer()

Generate random integer between 0 and 2147483647

Example:
@Integer()
Output:
6668888
@Integer(min,max,nullWeight)

Generate random integer between min and max with null ratio

Example:
@Integer(-100000,100000,"1:3")
Output:
-7811null787321290976028
@Integer(min,max)

Generate random integer between min and max

Example:
@Integer(100,200)
Output:
162133191
← Back to Function Reference