diff options
Diffstat (limited to 'src/Statements/SetStatement.php')
-rw-r--r-- | src/Statements/SetStatement.php | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/Statements/SetStatement.php b/src/Statements/SetStatement.php index 007134f..ef3a0c1 100644 --- a/src/Statements/SetStatement.php +++ b/src/Statements/SetStatement.php @@ -28,6 +28,7 @@ class SetStatement extends Statement */ public static $CLAUSES = array( 'SET' => array('SET', 3), + '_END_OPTIONS' => array('_END_OPTIONS', 1), ); /** @@ -42,6 +43,11 @@ class SetStatement extends Statement 'PASSWORD' => array(3, 'expr'), ); + public static $END_OPTIONS = array( + 'COLLATE' => array(1, 'var'), + 'DEFAULT' => 1 + ); + /** * Options used in current statement. * @@ -50,6 +56,15 @@ class SetStatement extends Statement public $options; /** + * The end options of this query. + * + * @var OptionsArray + * + * @see static::$END_OPTIONS + */ + public $end_options; + + /** * The updated values. * * @var SetOperation[] @@ -61,7 +76,10 @@ class SetStatement extends Statement */ public function build() { - return 'SET ' . OptionsArray::build($this->options) - . ' ' . SetOperation::build($this->set); + $ret = 'SET ' . OptionsArray::build($this->options) + . ' ' . SetOperation::build($this->set) + . ' ' . OptionsArray::build($this->end_options); + + return trim($ret); } } |