final class CreateTableAsSelectMutation
    implements ResultSetMutation

Applies CREATE TABLE ... AS SELECT ... operation to the virtual schema. This mutation creates a new table with structure and data from SELECT.

Methods§

public function __construct(
    string $tableName,
    list<string> $columnNames,
    TableDefinitionRegistry $registry,
    ColumnDeclaration $fallbackColumnType,
    bool $ifNotExists = false,
)

Parameters

$tableNamestringThe name of the new table to create.
$columnNameslist<string>Column names extracted from SELECT.
$registryTableDefinitionRegistryThe registry.
$fallbackColumnTypeColumnDeclarationThe dialect-provided type used when result metadata is unavailable.
$ifNotExistsboolWhether to skip if table exists.
public function tableName(): string

{@inheritDoc}

Returns

string
Test cases 1

Private surface 5§

Implementation details, listed for orientation only.

private string $tableName
private list<string> $columnNames
private TableDefinitionRegistry $registry
private ColumnDeclaration $fallbackColumnType
private bool $ifNotExists

Test cases 64§

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

Dedicated tests 10
Other tests reaching this symbol 54

Relations§

Instantiated in 2