fe1627a44ee54d0dcffd8cdd27d31f499ca6d5f6
kent
  Fri Jan 29 16:08:16 2021 -0800
Adding a function that is helpful when using facets on memory tables.

diff --git src/hg/inc/facetField.h src/hg/inc/facetField.h
index 2db82cc..b5be732 100644
--- src/hg/inc/facetField.h
+++ src/hg/inc/facetField.h
@@ -46,21 +46,26 @@
 
 boolean perRowFacetFields(int fieldCount, char **row, char *nullVal, struct facetField *ffArray[]);
 /* Process each row of a resultset updating use and select counts. 
  * Returns TRUE if row passes selected facet values filter and should be included in the final result set. */
 
 struct facetField *facetFieldsFromSqlTableInit(char *fields[], int fieldCount, char *selectedFields, struct facetField *ffArray[]);
 /* Initialize ffList and ffArray and selected facet values */
 
 void facetFieldsFromSqlTableFinish(struct facetField *ffList, int (*compare )(const void *elem1,  const void *elem2));
 /* Do final cleanup after passing over rows */
 
 struct facetField *facetFieldsFromSqlTable(struct sqlConnection *conn, char *table, char *fields[], int fieldCount, 
     char *nullVal, char *where, char *selectedFields, int *pSelectedRowCount);
 /* Return a list of facetField, one for each field of given table */
 
+struct facetField *facetFieldsFromFieldedTable(struct fieldedTable *ft, char *selectedFields,
+    struct facetField *ffArray[], int *retSelectedRowCount);
+/* Return a list of facetField, one for each selected field of given table.  It'll
+ * scan through table to do this and optionally you can get the count of selected rows. */
+
 struct facetVal *facetValMajorPlusOther(struct facetVal *list, double minRatio);
 /* Return a list of only the tags that are over minRatio of total tags.
  * If there are tags that have smaller amounts than this, lump them together
  * under "other".  Returns a new list. Use slFreeList() to free the result.  */
 
 #endif /* FACETFIELD_H */