/** * {@inheritdoc} */ public function walkLiteral($literal) { switch ($literal->type) { case AST\Literal::STRING: return $this->conn->quote($literal->value); case AST\Literal::BOOLEAN: $bool = strtolower($literal->value) == 'true' ? true : false; $boolVal = $this->conn->getDatabasePlatform()->convertBooleans($bool); return $boolVal; case AST\Literal::NUMERIC: return $literal->value; default: throw QueryException::invalidLiteral($literal); } }