8b6cd76349b34c42eb04ef082f72926337b3501a
tdreszer
  Thu Jan 27 17:17:02 2011 -0800
Made mdbUpdate -recreate faster by doing minimal error checking and loading with all insert statements.
diff --git src/hg/inc/mdb.h src/hg/inc/mdb.h
index d948bc2..085575d 100644
--- src/hg/inc/mdb.h
+++ src/hg/inc/mdb.h
@@ -197,30 +197,32 @@
 
 
 
 // ------ Table name and creation ------
 void mdbReCreate(struct sqlConnection *conn,char *tblName,boolean testOnly);
 // Creates ore Recreates the named mdb.
 
 char*mdbTableName(struct sqlConnection *conn,boolean mySandBox);
 // returns the mdb table name or NULL if conn supplied but the table doesn't exist
 
 
 // -------------- Updating the DB --------------
 int mdbObjsSetToDb(struct sqlConnection *conn,char *tableName,struct mdbObj *mdbObjs,boolean replace,boolean testOnly);
 // Adds or updates metadata obj/var pairs into the named table.  Returns total rows affected
 
+int mdbObjsLoadToDb(struct sqlConnection *conn,char *tableName,struct mdbObj *mdbObjs,boolean testOnly);
+// Adds mdb Objs with minimal error checking
 
 // ------------------ Querys -------------------
 struct mdbObj *mdbObjQuery(struct sqlConnection *conn,char *table,struct mdbObj *mdbObj);
 // Query the metadata table by obj and optional vars and vals in mdbObj struct.  If mdbObj is NULL query all.
 // Returns new mdbObj struct fully populated and sorted in obj,var order.
 #define mdbObjsQueryAll(conn,table) mdbObjQuery((conn),(table),NULL)
 
 struct mdbObj *mdbObjQueryByObj(struct sqlConnection *conn,char *table,char *obj,char *var);
 // Query a single metadata object and optional var from a table (default mdb).
 
 struct mdbByVar *mdbByVarsQuery(struct sqlConnection *conn,char *table,struct mdbByVar *mdbByVars);
 // Query the metadata table by one or more var=val pairs to find the distinct set of objs that satisfy ANY conditions.
 // Returns new mdbByVar struct fully populated and sorted in var,val,obj order.
 #define mdbByVarsQueryAll(conn,table) mdbByVarsQuery((conn),(table),NULL)
 
@@ -353,37 +355,34 @@
 // Search the metaDb table for vals by var.  Can impose (non-zero) limit on returned string size of val
 // Search is via mysql, so it's case-insensitive.  Return is sorted on val.
 
 struct slPair *mdbValLabelSearch(struct sqlConnection *conn, char *var, int limit, boolean tables, boolean files);
 // Search the metaDb table for vals by var and returns controlled vocabulary (cv) label
 // (if it exists) and val as a pair.  Can impose (non-zero) limit on returned string size of name.
 // Return is case insensitive sorted on name (label or else val).
 
 struct hash *mdbCvTermTypeHash();
 // returns a hash of hashes of mdb and controlled vocabulary (cv) term types
 // Those terms should contain label,descrition,searchable,cvDefined,hidden
 
 struct slPair *mdbCvWhiteList(boolean searchTracks, boolean cvLinks);
 // returns the official mdb/controlled vocabulary terms that have been whitelisted for certain uses.
 
-#define CV_SEARCH_SUPPORTS_FREETEXT
-#ifdef CV_SEARCH_SUPPORTS_FREETEXT
 enum mdbCvSearchable
 // metadata Variavble are only certain declared types
     {
     cvsNotSearchable        =0,  // Txt is default
     cvsSearchByMultiSelect  =1,  // Search by drop down multi-select of supplied list (NOT YET IMPLEMENTED)
     cvsSearchBySingleSelect =2,  // Search by drop down single-select of supplied list
     cvsSearchByFreeText     =3,  // Search by free text field (NOT YET IMPLEMENTED)
     cvsSearchByDateRange    =4,  // Search by discovered date range (NOT YET IMPLEMENTED)
     cvsSearchByIntegerRange =5   // Search by discovered integer range (NOT YET IMPLEMENTED)
     };
 
 enum mdbCvSearchable mdbCvSearchMethod(char *term);
 // returns whether the term is searchable // TODO: replace with mdbCvWhiteList() returning struct
-#endif//ndef CV_SEARCH_SUPPORTS_FREETEXT
 
 const char *cvLabel(char *term);
 // returns cv label if term found or else just term
 
 #endif /* MDB_H */