50bf71bc5c57303fb4d7225283f48cd13ba41bcf
angie
  Wed Nov 18 23:20:57 2015 -0800
Change to interface of annoStreamDbNew: instead of making the caller
pass in an asObject, the caller may now pass in a parsed JSON config
object (or NULL).  annoStreamDbNew will use this config object to
determine whether related tables need to be joined with the track table,
and produce its own asObj.  It doesn't actually do that yet -- this
is just an interface change that will enable it to do so.
refs #15544

diff --git src/hg/inc/hAnno.h src/hg/inc/hAnno.h
index f767e14..71d9519 100644
--- src/hg/inc/hAnno.h
+++ src/hg/inc/hAnno.h
@@ -1,43 +1,46 @@
 /* hAnno -- helpers for creating anno{Streamers,Grators,Formatters,Queries} */
 
 #ifndef HANNO_H
 #define HANNO_H
 
 #include "annoGrator.h"
 #include "jksql.h"
+#include "jsonParse.h"
 #include "trackDb.h"
 
 // Represent "unlimited" as limit==0.
 #define ANNO_NO_LIMIT 0
 
 
 struct annoAssembly *hAnnoGetAssembly(char *db);
 /* Make annoAssembly for db. */
 
 struct annoStreamer *hAnnoStreamerFromTrackDb(struct annoAssembly *assembly, char *selTable,
-                                              struct trackDb *tdb, char *chrom, int maxOutRows);
+                                              struct trackDb *tdb, char *chrom, int maxOutRows,
+                                              struct jsonElement *config);
 /* Figure out the source and type of data and make an annoStreamer. */
 
 struct annoGrator *hAnnoGratorFromBigFileUrl(char *fileOrUrl, struct annoAssembly *assembly,
                                              int maxOutRows, enum annoGratorOverlap overlapRule);
 /* Determine what kind of big data file/url we have, make an annoStreamer & in annoGrator. */
 
 struct annoGrator *hAnnoGratorFromTrackDb(struct annoAssembly *assembly, char *selTable,
                                           struct trackDb *tdb, char *chrom, int maxOutRows,
                                           struct asObject *primaryAsObj,
-                                          enum annoGratorOverlap overlapRule);
+                                          enum annoGratorOverlap overlapRule,
+                                          struct jsonElement *config);
 /* Figure out the source and type of data, make an annoStreamer & wrap in annoGrator.
  * If not NULL, primaryAsObj is used to determine whether we can make an annoGratorGpVar. */
 
 struct asObject *hAnnoGetAutoSqlForTdb(char *db, char *chrom, struct trackDb *tdb);
 /* If possible, return the asObj that a streamer for this track would use, otherwise NULL. */
 
 struct asObject *hAnnoGetAutoSqlForDbTable(char *db, char *table, struct trackDb *tdb,
                                            boolean skipBin);
 /* Get autoSql for db.dbTable from tdb and/or db.tableDescriptions;
  * if it doesn't match columns, make one up from db.table sql fields.
  * Some subtleties are lost in translation from .as to .sql, that's why
  * we try tdb & db.tableDescriptions first.  But ultimately we need to return
  * an asObj whose columns match all fields of the table. */
 
 #endif // HANNO_H