final class InsertSelectProjection

The insert select projection.

Methods§

public function __construct(
    private string $targetColumn,
    private ?int $sourceIndex,
    private ?string $defaultExpression,
    private ?int $generatedIdentityStart,
    private bool $nullValue,
)

Binds one column of the projection to exactly one of the four things it can be.

Every way of building one goes through a named constructor, because which of the four it is decides what the SELECT says in its place.

Parameters

$targetColumnstring
$sourceIndex?int
$defaultExpression?string
$generatedIdentityStart?int
$nullValuebool
public static function defaultExpression(string $targetColumn, string $expression): self
public function targetColumn(): string

Target column.

Returns

string
public function sourceIndex(): ?int

Source index.

Returns

?int
public function defaultExpressionValue(): ?string

Default expression value.

Returns

?string
public function generatedIdentityStart(): ?int

Generated identity start.

Returns

?int
public function isNullValue(): bool

Reports whether null value.

Returns

bool

Private surface 5§

Implementation details, listed for orientation only.

private string $targetColumn
private ?int $sourceIndex
private ?string $defaultExpression
private ?int $generatedIdentityStart
private bool $nullValue

Test cases 8§

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

Dedicated tests 7
Other tests reaching this symbol 1

Relations§

Static calls 4