1bd4b87716a3d00d853cdf552a263a9f3b1aa186 kent Fri Jan 24 20:12:36 2014 -0800 Exporting sqlExcapeTabFileString and improving it's opening comment. diff --git src/hg/inc/jksql.h src/hg/inc/jksql.h index 6802394..70597f5 100644 --- src/hg/inc/jksql.h +++ src/hg/inc/jksql.h @@ -212,30 +212,34 @@ char *sqlEscapeString2(char *to, const char* from); /* Prepares a string for inclusion in a sql statement. Output string * must be 2*strlen(from)+1 */ unsigned long sqlEscapeString3(char *to, const char* from); /* Prepares a string for inclusion in a sql statement. Output string * must be 2*strlen(from)+1. Returns actual escaped size not counting term 0. */ void sqlDyAppendEscaped(struct dyString *dy, char *s); /* Append to dy an escaped s */ char *sqlEscapeTabFileString2(char *to, const char *from); /* Escape a string for including in a tab seperated file. Output string * must be 2*strlen(from)+1 */ +char *sqlEscapeTabFileString(const char *from); +/* Escape a string for including in a tab seperated file. Freez or freeMem + * result when done. */ + struct sqlResult *sqlMustGetResult(struct sqlConnection *sc, char *query); /* Query database. * old comment: If result empty squawk and die. * This only applied back when sqlGetResult was using mysql_store_result. * These days, with mysql_use_result, we cannot know ahead of time * if there are results, we can only know by actually trying to fetch a row. * At then how would we put it back? So in fact right now sqlMustGetResult * is no different than sqlGetResult. */ void sqlFreeResult(struct sqlResult **pRes); /* Free up a result. */ int sqlCountColumns(struct sqlResult *sr); /* Count the number of columns in result. */