code: public function getOne(): ?string
      {
          $result = $this->execute();
          if (pg_num_rows($result) == 1) {
              // make sure only 1 field in query
              if (pg_num_fields($result) == 1) {
                  return pg_fetch_array($result)[0];
              }
              else {
                  throw new \Exception("Too many result fields");
              }
          }
          else {
              // either 0 or multiple records in result
              // if 0
              if (pg_num_rows($result) == 0) {
                  // no error here. client can error if appropriate
                  return null;
              }
              else {
                  throw new \Exception("Multiple results");
              }
          }
      }
docs: returns the value of the one column in one record or null if 0 records result