Property definitions

postgresql $ ExecStatusType :: defaultinit
extern class ExecStatusType `{int`}
  new empty           `{ return PGRES_EMPTY_QUERY; `}
  new command_ok      `{ return PGRES_COMMAND_OK; `}
  new tuples_ok       `{ return PGRES_TUPLES_OK; `}
  new copy_out        `{ return PGRES_COPY_OUT; `}
  new copy_in         `{ return PGRES_COPY_IN; `}
  new bad_response    `{ return PGRES_BAD_RESPONSE; `}
  new nonfatal_error  `{ return PGRES_NONFATAL_ERROR; `}
  new fatal_error     `{ return PGRES_FATAL_ERROR; `}

  fun is_ok: Bool `{
    return !(self == PGRES_BAD_RESPONSE || self == PGRES_NONFATAL_ERROR || self == PGRES_FATAL_ERROR);
  `}

  redef fun to_s import CString.to_s `{
    char * err = PQresStatus(self);
    if(err == NULL) err = "";
    return CString_to_s(err);
  `}
end
lib/postgresql/native_postgres.nit:24,1--43,3