src/hg/lib/suggest.c 1.1
1.1 2010/02/06 03:15:04 larrym
code to support suggesting genes given a prefix typed by the user
Index: src/hg/lib/suggest.c
===================================================================
RCS file: src/hg/lib/suggest.c
diff -N src/hg/lib/suggest.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ src/hg/lib/suggest.c 6 Feb 2010 03:15:04 -0000 1.1
@@ -0,0 +1,18 @@
+/* code to support suggesting genes given a prefix typed by the user. */
+
+#include "suggest.h"
+
+boolean connSupportsGeneSuggest(struct sqlConnection *conn)
+// return true if this connection has tables to support gene autocompletion
+{
+return sqlTableExists(conn, "knownCanonical") || sqlTableExists(conn, "refGene");
+}
+
+boolean assemblySupportsGeneSuggest(char *database)
+// return true if this assembly has tables to support gene autocompletion
+{
+struct sqlConnection *conn = hAllocConn(database);
+boolean retval = connSupportsGeneSuggest(conn);
+hFreeConn(&conn);
+return retval;
+}