* @copyright 2010-2014 Justin Swanhart and André Rothe * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) * @version SVN: $Id: LikeBuilder.php 830 2013-12-18 09:35:42Z phosco@gmx.de $ * */ require_once dirname(__FILE__) . '/../exceptions/UnableToCreateSQLException.php'; require_once dirname(__FILE__) . '/TableBuilder.php'; /** * This class implements the builder for the LIKE 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 LikeBuilder { protected function buildTable($parsed, $index) { $builder = new TableBuilder(); return $builder->build($parsed, $index); } public function build($parsed) { $sql = $this->buildTable($parsed, 0); if (strlen($sql) === 0) { throw new UnableToCreateSQLException('LIKE', "", $like, 'table'); } return "LIKE " . $sql; } } ?>