classTextFields
final class TextFields
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Text fields operations for PostgreSQL copy.
Methods§
public function validateSeparator(string $separator): voidValidate separator.
Parameters
$separator | string |
Throws
ValueErrorTest cases 1
Called from 2
- method-call ZtdQuery\Platform\Postgres\Connection\Copy\PgSqlCopySupport::encodeRow() packages/ztd-query-postgres/src/Connection/Copy/PgSqlCopySupport.php:98
- method-call ZtdQuery\Platform\Postgres\Connection\Copy\PgSqlCopySupport::decodeRow() packages/ztd-query-postgres/src/Connection/Copy/PgSqlCopySupport.php:131
public function escape(string $value, string $separator): stringEscape.
Parameters
$value | string | |
$separator | string |
Returns
stringTest cases 2
Called from 1
Calls 1
- function-call
strlenline 33
public function decodeFields(string $row, string $separator, string $nullAs): list<string|null>Parameters
$row | string | |
$separator | string | |
$nullAs | string |
Returns
list<string|null>Throws
ValueErrorTest cases 1
Called from 1
Calls 3
- function-call
strlenline 61 - function-call
substrline 64 - method-call TextFields::decodeEscape() line 77
public function decodeEscape(string $row, int &$index): stringDecodes an escape and advances the caller to its final source byte.
Parameters
$row | string | |
$index | int |
Returns
stringThrows
ValueErrorTest cases 1
Called from 1
Calls 4
- new
ValueErrorline 90 - method-call TextFields::octalByte() line 94
- function-call
ctype_xdigitline 97 - method-call TextFields::hexByte() line 98
public function octalByte(string $row, int &$index, string $next): stringReads at most three octal digits and rejects values outside one byte.
Parameters
$row | string | |
$index | int | |
$next | string |
Returns
stringThrows
ValueErrorTest cases 1
Called from 1
public function hexByte(string $row, int &$index, string $following): stringReads at most two hexadecimal digits after an escape prefix.
Parameters
$row | string | |
$index | int | |
$following | string |
Returns
stringThrows
ValueErrorTest cases 1
Called from 1
Test cases 8§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 6
TextFieldsTest::testDecodeEscapeAdvancesOverOneEncodedBytecallsTextFieldsTest::testDecodeFieldscallsTextFieldsTest::testEscapecallsTextFieldsTest::testHexByteConsumesTwoDigitsAfterThePrefixcallsTextFieldsTest::testOctalByteConsumesAtMostThreeDigitscallsTextFieldsTest::testValidateSeparatorcalls
Other tests reaching this symbol 2
PgSqlCopySupportTestcallsPgSqlSessionFactoryTestcalls
Relations§
Instantiated in 4
- new ZtdQuery\Platform\Postgres\Connection\Copy\PgSqlCopySupport::encodeRow() packages/ztd-query-postgres/src/Connection/Copy/PgSqlCopySupport.php:98
- new ZtdQuery\Platform\Postgres\Connection\Copy\PgSqlCopySupport::encodeRow() packages/ztd-query-postgres/src/Connection/Copy/PgSqlCopySupport.php:119
- new ZtdQuery\Platform\Postgres\Connection\Copy\PgSqlCopySupport::decodeRow() packages/ztd-query-postgres/src/Connection/Copy/PgSqlCopySupport.php:131
- new ZtdQuery\Platform\Postgres\Connection\Copy\PgSqlCopySupport::decodeRow() packages/ztd-query-postgres/src/Connection/Copy/PgSqlCopySupport.php:144
Method calls 4
- method-call ZtdQuery\Platform\Postgres\Connection\Copy\PgSqlCopySupport::encodeRow() packages/ztd-query-postgres/src/Connection/Copy/PgSqlCopySupport.php:98
- method-call ZtdQuery\Platform\Postgres\Connection\Copy\PgSqlCopySupport::encodeRow() packages/ztd-query-postgres/src/Connection/Copy/PgSqlCopySupport.php:119
- method-call ZtdQuery\Platform\Postgres\Connection\Copy\PgSqlCopySupport::decodeRow() packages/ztd-query-postgres/src/Connection/Copy/PgSqlCopySupport.php:131
- method-call ZtdQuery\Platform\Postgres\Connection\Copy\PgSqlCopySupport::decodeRow() packages/ztd-query-postgres/src/Connection/Copy/PgSqlCopySupport.php:144