src/Koldy/Db/Query/Delete.php
public function getQuery(): Query
    {
        if ($this->table === null) {
            throw new Exception('Unable to build DELETE query when table name is not set');
        }

        $sql = "DELETE FROM {$this->table}";

        if ($this->hasWhere()) {
            $sql .= "\nWHERE{$this->getWhereSql()}";
        }

        return new Query($sql, $this->getBindings(), $this->getAdapterConnection());
    }
public function getQuery(): Query
    {
        if ($this->table === null) {
            throw new Exception('Unable to build DELETE query when table name is not set');
        }

        $sql = "DELETE FROM {$this->table}";

        if ($this->hasWhere()) {
            $sql .= "\nWHERE{$this->getWhereSql()}";
        }

        return new Query($sql, $this->getBindings(), $this->getAdapterConnection());
    }
public function getQuery ( ) : Query { if ( $ this -> table === null ) { throw new Exception ( 'Unable to build DELETE query when table name is not set' ) ; } $ sql = "DELETE FROM {$this->table}" ; if ( $ this -> hasWhere ( ) ) { $ sql .= "\nWHERE{$this->getWhereSql()}" ; } return new Query ( $ sql , $ this -> getBindings ( ) , $ this -> getAdapterConnection ( ) ) ; }
Get the query that will be executed
@return Query
@throws Exception
@throws \Koldy\Db\Exception
Get the query that will be executed