summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Components/RenameOperation.php2
-rw-r--r--src/Statements/CreateStatement.php2
-rw-r--r--src/Statements/RenameStatement.php8
3 files changed, 10 insertions, 2 deletions
diff --git a/src/Components/RenameOperation.php b/src/Components/RenameOperation.php
index 2e3d6ef..e9bd9ce 100644
--- a/src/Components/RenameOperation.php
+++ b/src/Components/RenameOperation.php
@@ -68,7 +68,7 @@ class RenameOperation extends Component
*
* 1 ------------------------[ TO ]-----------------------> 2
*
- * 2 ---------------------[ old name ]--------------------> 3
+ * 2 ---------------------[ new name ]--------------------> 3
*
* 3 ------------------------[ , ]------------------------> 0
* 3 -----------------------[ else ]----------------------> (END)
diff --git a/src/Statements/CreateStatement.php b/src/Statements/CreateStatement.php
index 808109e..65cdbbb 100644
--- a/src/Statements/CreateStatement.php
+++ b/src/Statements/CreateStatement.php
@@ -411,7 +411,7 @@ class CreateStatement extends Statement
$this->select = new SelectStatement($parser, $list);
} elseif ($token->type === Token::TYPE_KEYWORD
&& $token->keyword === 'LIKE') {
- /* CREATE TABLE `new_tbl` LIKE 'orig_tbl' */
+ /* CREATE TABLE `new_tbl` LIKE 'orig_tbl' */
$list->idx = $nextidx;
$this->like = Expression::parse(
$parser,
diff --git a/src/Statements/RenameStatement.php b/src/Statements/RenameStatement.php
index 90533c2..e1bcf0d 100644
--- a/src/Statements/RenameStatement.php
+++ b/src/Statements/RenameStatement.php
@@ -47,4 +47,12 @@ class RenameStatement extends Statement
$list->getNextOfTypeAndValue(Token::TYPE_KEYWORD, 'TABLE');
}
}
+
+ /**
+ * @return string
+ */
+ public function build()
+ {
+ return 'RENAME TABLE ' . RenameOperation::build($this->renames);
+ }
}