interfaceCopySupport
interface CopySupport
How a dialect writes COPY, where it has one at all.
COPY moves rows in and out of a table without a statement per row, so simulating it means knowing how the rows are written, how they are read back, and what the statement is written against.
Methods§
public function tableName(string $relation): stringTable name.
Parameters
$relation | string |
Returns
stringpublic function target(
string $relation,
?string $fields,
TableDefinition $definition,
): CopyTargetpublic function selectSql(CopyTarget $target): stringpublic function insertSql(CopyTarget $target, int $rowCount, bool $overrideSystemValue): stringpublic function encodeRow(list<mixed> $values, string $separator, string $nullAs): stringParameters
$values | list<mixed> | |
$separator | string | |
$nullAs | string |
Returns
stringpublic function decodeRow(string $row, string $separator, string $nullAs): list<string|null>Parameters
$row | string | |
$separator | string | |
$nullAs | string |
Returns
list<string|null>public function isCopyStatement(string $sql): boolReports whether copy statement.
Parameters
$sql | string |
Returns
boolTest cases 5§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Other tests reaching this symbol 5
Relations§
Implemented by 2
Type declarations 4
- type ZtdQuery\Platform packages/ztd-query-core/src/Platform.php:48
- type ZtdQuery\Platform\MySql\MySqlPlatform packages/ztd-query-mysql/src/MySqlPlatform.php:102
- type ZtdQuery\Platform\Postgres\PgSqlPlatform packages/ztd-query-postgres/src/PgSqlPlatform.php:92
- type ZtdQuery\Platform\Sqlite\SqlitePlatform packages/ztd-query-sqlite/src/SqlitePlatform.php:88