final class Notify
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

NOTIFY channel [, payload]: a request to send a notification to the listeners of a channel.

Rule: PG-NOTIFY-001. Mirrors PostgreSQL's NotifyStmt (conditionname, payload). The statement also occurs as an action of a rule. Facts: none; a channel is not part of a declaration context. Diagnostic: a payload of 8000 bytes or more, the limit of the default configuration (a block size of 8192 bytes), counted in UTF-8. Source: https://www.postgresql.org/docs/17/sql-notify.html. Status: Implemented.

Reading a notification with a payloaddoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze("NOTIFY jobs, 'ready'");
    [$operation->statement->channel->value, $operation->statement->payload->value] // => ['jobs', 'ready']

Properties§

public Name $channel
public StringConstant|null $payload = null

Methods§

public function __construct(public Name $channel, public StringConstant|null $payload = null)

Parameters

$channelNameThe channel name
$payloadStringConstant|nullThe payload string, when written
public function deriveStatement(Derivation $derivation): void

Reports a payload longer than the server takes.

Parameters

$derivationDerivation
Calls 5
public function render(Output $out): void

Writes the request.

Parameters

$outOutput
Calls 3

Private surface 1§

Implementation details, listed for orientation only.

private const PAYLOAD_LIMIT = 8000

Test cases 2§

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

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 1