classPiece
final class Piece
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.
One lexical unit of rendered SQL.
Properties§
public PieceKind $kindpublic string $textpublic bool $glued = falsepublic string|null $gap = nullMethods§
public function __construct(
public PieceKind $kind,
public string $text,
public bool $glued = false,
public string|null $gap = null,
)Parameters
$kind | PieceKind | What the piece is |
$text | string | The exact spelling |
$glued | bool | Whether the piece follows the previous one without a separating space |
$gap | string|null | The exact trivia written before the piece, from a layout; null for the regular spacing |
Test cases 16§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Other tests reaching this symbol 14
LexicalTest::testJoinHonoursGlueAndWritesNothingForNoPiecescallsLexicalTest::testJoinSeparatesPiecesWithOneSpaceExceptAroundTightPunctuationcallsLexicalTest::testTightDecidesByTheSymbolOnEitherSidecallsOutputTest::testCanonicalKeepsTheRenderedTextOfEveryPiececallsOutputTest::testGlueJoinsOnlyTheNextPiececallsOutputTest::testKeywordWritesEachUpperCaseWordAsAPiececallsOutputTest::testLayoutRespellsEachRenderedPieceAndKeepsTheRenderedTextcallsOutputTest::testLayoutWithoutALayoutRendersRegularlycallsOutputTest::testListSeparatesChildrenWithTheSymbolcallsOutputTest::testNameIsSpelledByTheCodecForItsPositioncallsOutputTest::testNodeWritesAChildAndNothingForNullcallsOutputTest::testSymbolWritesPunctuationOnlycallsPieceKindTest::testOnlyTheSymbolKindIsTightAgainstPunctuationcallsNodeTest::testRenderWritesTypedPiecesOnlycalls
Relations§
Instantiated in 3
- new SqlSemantics\Platform\Sqlite\Model\Rendering\Output::layout() packages/sql-semantics-sqlite/src/Model/Rendering/Output.php:172
- new SqlSemantics\Platform\Sqlite\Model\Rendering\Output::add() packages/sql-semantics-sqlite/src/Model/Rendering/Output.php:203
- new SqlSemantics\Platform\Sqlite\Model\Rendering\Output::add() packages/sql-semantics-sqlite/src/Model/Rendering/Output.php:204