Submit
Path:
~
/
/
opt
/
psa
/
phpMyAdmin
/
vendor
/
phpmyadmin
/
sql-parser
/
src
/
Statements
/
File Content:
RenameStatement.php
<?php declare(strict_types=1); namespace PhpMyAdmin\SqlParser\Statements; use PhpMyAdmin\SqlParser\Components\RenameOperation; use PhpMyAdmin\SqlParser\Parser; use PhpMyAdmin\SqlParser\Statement; use PhpMyAdmin\SqlParser\Token; use PhpMyAdmin\SqlParser\TokensList; /** * `RENAME` statement. * * RENAME TABLE tbl_name TO new_tbl_name * [, tbl_name2 TO new_tbl_name2] ... */ class RenameStatement extends Statement { /** * The old and new names of the tables. * * @var RenameOperation[]|null */ public $renames; /** * Function called before the token is processed. * * Skips the `TABLE` keyword after `RENAME`. * * @param Parser $parser the instance that requests parsing * @param TokensList $list the list of tokens to be parsed * @param Token $token the token that is being parsed * * @return void */ public function before(Parser $parser, TokensList $list, Token $token) { if (($token->type !== Token::TYPE_KEYWORD) || ($token->keyword !== 'RENAME')) { return; } // Checking if it is the beginning of the query. $list->getNextOfTypeAndValue(Token::TYPE_KEYWORD, 'TABLE'); } /** * @return string */ public function build() { return 'RENAME TABLE ' . RenameOperation::build($this->renames); } }
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
AlterStatement.php
4590 bytes
0644
AnalyzeStatement.php
744 bytes
0644
BackupStatement.php
631 bytes
0644
CallStatement.php
716 bytes
0644
CheckStatement.php
632 bytes
0644
ChecksumStatement.php
553 bytes
0644
CreateStatement.php
24805 bytes
0644
DeleteStatement.php
11457 bytes
0644
DropStatement.php
1647 bytes
0644
ExplainStatement.php
9290 bytes
0644
InsertStatement.php
7373 bytes
0644
KillStatement.php
5582 bytes
0644
LoadStatement.php
11341 bytes
0644
LockStatement.php
3443 bytes
0644
MaintenanceStatement.php
1501 bytes
0644
NotImplementedStatement.php
1329 bytes
0644
OptimizeStatement.php
748 bytes
0644
PurgeStatement.php
3825 bytes
0644
RenameStatement.php
1391 bytes
0644
RepairStatement.php
674 bytes
0644
ReplaceStatement.php
5091 bytes
0644
RestoreStatement.php
580 bytes
0644
SelectStatement.php
8536 bytes
0644
SetStatement.php
2417 bytes
0644
ShowStatement.php
1386 bytes
0644
TransactionStatement.php
2525 bytes
0644
TruncateStatement.php
854 bytes
0644
UpdateStatement.php
3989 bytes
0644
WithStatement.php
11754 bytes
0644
N4ST4R_ID | Naxtarrr