final class BatchDatabaseChecker

Execute batched database queries for wildcard exists/unique validation.

This is a thin query layer — rule interpretation and metadata extraction happen on the Validator (using its own parseTable, getQueryColumn, etc.). This class only receives pre-built groups and runs the batch queries.

Builds a PrecomputedPresenceVerifier that can be set on the validator, keeping original rule objects intact for correct error message resolution.

Constants

private CHUNK_SIZE

Methods

buildVerifier(array $groups, PresenceVerifierInterface|null $fallback, array $unsafeTableColumns = [])

Build a PrecomputedPresenceVerifier from grouped rules.

Details

at line 35
static PrecomputedPresenceVerifier|null buildVerifier(array $groups, PresenceVerifierInterface|null $fallback, array $unsafeTableColumns = [])

Build a PrecomputedPresenceVerifier from grouped rules.

Accepts the fallback verifier explicitly rather than resolving from the container, so that custom verifiers set via setPresenceVerifier() are respected for non-batched fallback lookups.

Parameters

array $groups
PresenceVerifierInterface|null $fallback
array $unsafeTableColumns

table:column pairs that must not be precomputed because other rules use the same pair with a different query shape

Return Value

PrecomputedPresenceVerifier|null