* @copyright 2010-2014 Justin Swanhart and André Rothe * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) * @version SVN: $Id$ * */ namespace PHPSQLParser\builders; /** * This class implements the builder for the whole Truncate statement. 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 TruncateStatementBuilder implements Builder { protected function buildTRUNCATE($parsed) { $builder = new TruncateBuilder(); return $builder->build($parsed); } protected function buildFROM($parsed) { $builder = new FromBuilder(); return $builder->build($parsed); } public function build(array $parsed) { $sql = $this->buildTRUNCATE($parsed); // $sql .= " " . $this->buildTRUNCATE($parsed) // Uncomment when parser fills in expr_type=table return $sql; } } ?>