summaryrefslogtreecommitdiffstats
path: root/src/Statements/BackupStatement.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Statements/BackupStatement.php')
-rw-r--r--src/Statements/BackupStatement.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/Statements/BackupStatement.php b/src/Statements/BackupStatement.php
new file mode 100644
index 0000000..bca4be7
--- /dev/null
+++ b/src/Statements/BackupStatement.php
@@ -0,0 +1,51 @@
+<?php
+
+namespace SqlParser\Statements;
+
+use SqlParser\Statement;
+
+/**
+ * `BACKUP` statement.
+ *
+ * BACKUP TABLE tbl_name [, tbl_name] ... TO '/path/to/backup/directory'
+ *
+ * @category Statements
+ * @package SqlParser
+ * @subpackage Statements
+ * @author Dan Ungureanu <udan1107@gmail.com>
+ * @license http://opensource.org/licenses/GPL-2.0 GNU Public License
+ */
+class BackupStatement extends Statement
+{
+
+ /**
+ * Options of this statement.
+ *
+ * @var array
+ */
+ public static $OPTIONS = array(
+
+ 'TABLE' => 1,
+
+ 'NO_WRITE_TO_BINLOG' => 2,
+ 'LOCAL' => 3,
+
+ 'TO' => array(4, 'var'),
+ );
+
+ /**
+ * The options of this query.
+ *
+ * @var OptionsFragment
+ *
+ * @see static::$OPTIONS
+ */
+ public $options;
+
+ /**
+ * Backup tables.
+ *
+ * @var FieldFragment[]
+ */
+ public $tables;
+}