* @copyright 2010-2014 Justin Swanhart and André Rothe * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) * @version SVN: $Id: CreateTableSelectOptionBuilder.php 932 2014-01-08 13:15:26Z phosco@gmx.de $ * */ /** * This class implements the builder for the select-options statement part of CREATE TABLE. * You can overwrite all functions to achieve another handling. * * @author André Rothe * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) * */ class CreateTableSelectOptionBuilder { public function build($parsed) { if (!isset($parsed['select-option']) || $parsed['select-option'] === false) { return ""; } $option = $parsed['select-option']; $sql = ($option['duplicates'] === false ? '' : (' ' . $option['duplicates'])); $sql .= ($option['as'] === false ? '' : ' AS'); return $sql; } } ?>