final class LiteralGenerator
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

Generates PostgreSql literal bodies for the bounded lexical API.

Owns the alphabets and numeric formatting used by this dialect.

Methods§

public function __construct(Generator $faker)

Parameters

$fakerGeneratorSource of every choice the generated strings make
Calls 1
public function rawIdentifier(int $minLength = 1, int $maxLength = 12): string
public function integerString(int $min = 1, int $max = 9999999999): non-empty-string
public function hexString(int $minLength = 1, int $maxLength = 16): string
public function binaryString(int $minLength = 1, int $maxLength = 32): string
public function floatString(
    string $mantissa,
    int $minExponent = -20,
    int $maxExponent = 20,
): non-empty-string

Generate a random float literal string with exponent.

Parameters

$mantissastring
$minExponentint
$maxExponentint

Returns

non-empty-string
Test cases 2
Called from 1
Calls 1
  • method-call Generator::numberBetween() line 113
public function parameterIndex(int $min = 1, int $max = 10): non-empty-string

Generate a random parameter index string.

Parameters

$minint
$maxint

Returns

non-empty-string
Test cases 2
Called from 1
Calls 1
  • method-call Generator::numberBetween() line 123

Private surface 7§

Implementation details, listed for orientation only.

private const ALPHA_UNDERSCORE = 'abcdefghijklmnopqrstuvwxyz_'
private const ALNUM_UNDERSCORE = 'abcdefghijklmnopqrstuvwxyz0123456789_'
private const MIXED_ALNUM_UNDERSCORE = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'
private const HEX_CHARS = '0123456789abcdef'
private const BINARY_CHARS = '01'
private Generator $faker
private RandomCharacters $characters

Test cases 36§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 31
Other tests reaching this symbol 5

Relations§

Instantiated in 1
Method calls 9
Type declarations 1