final class ColumnRef

One end of a relation: a table and the columns of it that take part.

Written order.id, or order.(shop_id, no) for a composite key, following the reference syntax of DBML.

Properties§

public string $table
public list<string> $columns

Methods§

public function __construct(public string $table, public list<string> $columns)
public static function of(string $table, string ...$columns): self

Returns of.

Parameters

$tablestring
$columnsstring

Returns

self
Test cases 36
Calls 2
public static function from(string $reference): self

Read an endpoint written as order.id or order.(shop_id, no).

Parameters

$referencestring

Returns

self
Test cases 5
Called from 7
Calls 12
public function isComposite(): bool
public function equals(self $other): bool

Whether both ends name the same table and columns.

Parameters

$otherself

Returns

bool
public function toString(): string

Returns to string.

Returns

string
Called from 10
Calls 2
public function __toString(): string

Returns the canonical textual representation.

Returns

string
Calls 1

Test cases 80§

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

Dedicated tests 15
Other tests reaching this symbol 65

Relations§

Instantiated in 2
Static calls 7
Method calls 10
Type checks 7
Type declarations 32