a019cec925f0e902a6eb2ddeb781dd549c7e9406 chmalee Fri Mar 5 15:54:25 2021 -0800 Add public track hub results to track search, refs #26179 diff --git src/hg/lib/hubPublic.c src/hg/lib/hubPublic.c index e0bd79d..98fcb2e 100644 --- src/hg/lib/hubPublic.c +++ src/hg/lib/hubPublic.c @@ -1,27 +1,26 @@ /* hubPublic.c was originally generated by the autoSql program, which also * generated hubPublic.h and hubPublic.sql. This module links the database and * the RAM representation of objects. */ #include "common.h" #include "linefile.h" #include "dystring.h" #include "jksql.h" #include "hubPublic.h" - char *hubPublicCommaSepFieldNames = "hubUrl,shortLabel,longLabel,registrationTime,dbCount,dbList,descriptionUrl"; void hubPublicStaticLoad(char **row, struct hubPublic *ret) /* Load a row from hubPublic table into ret. The contents of ret will * be replaced at the next call to this function. */ { ret->hubUrl = row[0]; ret->shortLabel = row[1]; ret->longLabel = row[2]; ret->registrationTime = row[3]; ret->dbCount = sqlUnsigned(row[4]); ret->dbList = row[5]; ret->descriptionUrl = row[6]; } @@ -245,15 +244,32 @@ fprintf(f, "%s", el->dbList); fputc('"',f); fputc(',',f); fputc('"',f); fprintf(f,"descriptionUrl"); fputc('"',f); fputc(':',f); fputc('"',f); fprintf(f, "%s", el->descriptionUrl); fputc('"',f); fputc('}',f); } /* -------------------------------- End autoSql Generated Code -------------------------------- */ + +struct hubEntry *hubEntryTextLoad(char **row, bool hasDescription) +{ +struct hubEntry *ret; +AllocVar(ret); +ret->hubUrl = cloneString(row[0]); +ret->shortLabel = cloneString(row[1]); +ret->longLabel = cloneString(row[2]); +ret->dbList = cloneString(row[3]); +ret->errorMessage = cloneString(row[4]); +ret->id = sqlUnsigned(row[5]); +if (hasDescription) + ret->descriptionUrl = cloneString(row[6]); +else + ret->descriptionUrl = NULL; +return ret; +}