struct slName* getTableList(struct sqlConnection *conn) /* get the list of existing tables */ { struct slName *tables = NULL; tables = slCat(tables, gbMetaDataListTables(conn)); tables = slCat(tables, gbAlignDataListTables(conn)); gbAddTableIfExists(conn, "gbLoaded", &tables); gbAddTableIfExists(conn, "gbStatus", &tables); /* must be last */ slReverse(&tables); return tables; }
struct slName* gbMetaDataListTables(struct sqlConnection *conn) /* Get a list of metadata tables that exist in the database */ { static char* TABLE_NAMES[] = { "gbSeq", "gbExtFile", "gbCdnaInfo", "refSeqStatus", "refSeqSummary", "refLink", "imageClone", "gbMiscDiff", "gbWarn", NULL }; struct slName* tables = NULL; int i; for (i = 0; TABLE_NAMES[i] != NULL; i++) gbAddTableIfExists(conn, TABLE_NAMES[i], &tables); for (i = 0; raFieldTables[i] != NULL; ++i) gbAddTableIfExists(conn, raFieldTables[i], &tables); return tables; }
struct slName* gbGeneTblList(struct sqlConnection *conn) /* Get list of genePred tables in database. */ { struct slName* tables = NULL; gbAddTableIfExists(conn, REF_GENE_TBL, &tables); gbAddTableIfExists(conn, REF_FLAT_TBL, &tables); gbAddTableIfExists(conn, XENO_REF_GENE_TBL, &tables); gbAddTableIfExists(conn, XENO_REF_FLAT_TBL, &tables); gbAddTableIfExists(conn, MGC_GENES_TBL, &tables); gbAddTableIfExists(conn, ORFEOME_GENES_TBL, &tables); return tables; }