public function getQuery(): string
    {
        if (null !== $this->query) {
            return $this->query;
        }

        switch ($this->type) {
            case Statement::SELECT:
                $this->query = $this->getSelectQuery();
                break;
            case Statement::UPDATE:
                $this->query = $this->getUpdateQuery();
                break;
            case Statement::INSERT:
                $this->query = $this->getInsertQuery();
                break;
            case Statement::DELETE:
                $this->query = $this->getDeleteQuery();
                break;
        }

        return $this->query;
    }
public function getQuery(): string
    {
        if (null !== $this->query) {
            return $this->query;
        }

        switch ($this->type) {
            case Statement::SELECT:
                $this->query = $this->getSelectQuery();
                break;
            case Statement::UPDATE:
                $this->query = $this->getUpdateQuery();
                break;
            case Statement::INSERT:
                $this->query = $this->getInsertQuery();
                break;
            case Statement::DELETE:
                $this->query = $this->getDeleteQuery();
                break;
        }

        return $this->query;
    }
public function getQuery ( ) : string { if ( null !== $ this -> query ) { return $ this -> query ; } switch ( $ this -> type ) { case Statement :: SELECT : $ this -> query = $ this -> getSelectQuery ( ) ; break ; case Statement :: UPDATE : $ this -> query = $ this -> getUpdateQuery ( ) ; break ; case Statement :: INSERT : $ this -> query = $ this -> getInsertQuery ( ) ; break ; case Statement :: DELETE : $ this -> query = $ this -> getDeleteQuery ( ) ; break ; } return $ this -> query ; }
Get the built query string.

@return string
Get the built query string .