public function getFields($asNames = false) {
    $result = array_keys(array_filter(self::$columns, function ($field) {
              return 0 !== $field[$this->type];
            }));
    if ($asNames) {
      $return = [];
      foreach ($result as $field) {
        $return[] = self::$names[$field];
      }
      return $return;
    } else {
      return $result;
    }
  }