public function getDeleteSQL()
        {
            if (!$this->query->getTable() instanceof Table) {
                throw new Exception('Trying to generate sql when no table is being used.');
            }
            $sql = 'DELETE FROM ' . $this->getTable()->getSqlTableName();
            $sql .= $this->generateWhereSQL(true);

            return $sql;
        }