src/hg/lib/hdb.c 1.411
1.411 2009/08/31 19:10:49 markd
converted gbSeq related sqlTableExists to hTableExists
Index: src/hg/lib/hdb.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/hdb.c,v
retrieving revision 1.410
retrieving revision 1.411
diff -b -B -U 4 -r1.410 -r1.411
--- src/hg/lib/hdb.c 20 Aug 2009 18:11:36 -0000 1.410
+++ src/hg/lib/hdb.c 31 Aug 2009 19:10:49 -0000 1.411
@@ -1353,9 +1353,9 @@
HGID *retId, HGID *retExtId, size_t *retSize, off_t *retOffset)
/* lookup information in the seq or gbSeq table */
{
boolean gotIt = FALSE;
-if (sqlTableExists(conn, seqTbl))
+if (hTableExists(sqlGetDatabase(conn), seqTbl))
{
char query[256];
safef(query, sizeof(query),
"select id, %s, file_offset, file_size from %s where acc = '%s'",
@@ -1499,17 +1499,17 @@
struct sqlConnection *conn = hAllocConn(db);
boolean haveSeq = FALSE;
/* Check compatTable if we have it, otherwise check seq and gbSeq */
-if ((compatTable != NULL) && sqlTableExists(conn, compatTable))
+if ((compatTable != NULL) && hTableExists(db, compatTable))
{
haveSeq = checkIfInTable(conn, acc, "name", compatTable);
}
else
{
- if (sqlTableExists(conn, "gbSeq"))
+ if (hTableExists(db, "gbSeq"))
haveSeq = checkIfInTable(conn, acc, "acc", "gbSeq");
- if ((!haveSeq) && sqlTableExists(conn, "seq"))
+ if ((!haveSeq) && hTableExists(db, "seq"))
haveSeq = checkIfInTable(conn, acc, "acc", "seq");
}
hFreeConn(&conn);
@@ -1549,9 +1549,9 @@
struct dnaSeq *seq = NULL;
/* If we have the compat table, get the sequence from there, otherwise from
* seq or gbSeq. */
-if ((compatTable != NULL) && sqlTableExists(conn, compatTable))
+if ((compatTable != NULL) && hTableExists(sqlGetDatabase(conn), compatTable))
{
seq = loadSeqFromTable(conn, acc, compatTable);
}
else
@@ -1595,9 +1595,9 @@
/* If we have the compat table, get the sequence from there, otherwise from
* gbSeq. */
-if ((compatTable != NULL) && sqlTableExists(conn, compatTable))
+if ((compatTable != NULL) && hTableExists(sqlGetDatabase(conn), compatTable))
{
seq = loadSeqFromTable(conn, acc, compatTable);
}
else