final public function get($closure=NULL) {
      $this->connection();
      if ($this->table===NULL) {
         if ( !preg_match('/^ *FROM +\(/', $this->from) ) {
            $this->from = '';
         }
      }
      else {
         if (preg_match('/\./', $this->table) || !$this->schema ) {
            $this->from = str_replace("_table_", $this->table, $this->from);
         }
         else {
            $this->from = str_replace("_table_", $this->schema.'.'.$this->table, $this->from);
         }
      }

      $this->last_sql = $this->sql = $this->select.' '.$this->from.' '.$this->join.' '.$this->where.' '.$this->union.' '.$this->groupBy.' '.$this->having.' '.$this->orderBy.' '.$this->limit.' '.$this->offset;

      if ($closure===FALSE) return $this->sql;

      $this->fetch();

      $this->data = $this->rows;

      $this->reset();

      if ( $this->tableOrig!==NULL ) {
         $this->table = $this->tableOrig;
      }

      if ($closure instanceof \Closure) {
         $this->data = $closure( $this->data, $this );
      }

      return $this->data ?: [];
   }