c118b41f4a28f79fa50b48c47ddd753016d5e1fc galt Tue Jan 30 00:28:53 2018 -0800 fixing field lists. rqlQuery is not real db query. added a couple of new sqlSafef family helper functions in jksql diff --git src/hg/inc/jksql.h src/hg/inc/jksql.h index 615749d..8a71d60 100644 --- src/hg/inc/jksql.h +++ src/hg/inc/jksql.h @@ -725,29 +725,35 @@ #ifdef __GNUC__ __attribute__((format(printf, 2, 3))) #endif ; #define NOSQLINJ "NOSQLINJ " struct dyString *sqlDyStringCreate(char *format, ...) /* Create a dyString with a printf style initial content * Adds the NOSQLINJ prefix. */ #ifdef __GNUC__ __attribute__((format(printf, 1, 2))) #endif ; +void sqlDyStringPrintIdList(struct dyString *ds, char *fields); +/* Append a comma-separated list of field identifiers. Aborts if invalid characters in list. */ + +void sqlDyStringPrintValuesList(struct dyString *ds, struct slName *values); +/* Append a comma-separated, quoted and escaped list of values. */ + void sqlCheckError(char *format, ...) /* A sql injection error has occurred. Check for settings and respond * as appropriate with error, warning, logOnly, ignore, dumpstack. * Then abort if needed. NOTE: unless it aborts, this function will return! */ #ifdef __GNUC__ __attribute__((format(printf, 1, 2))) #endif ; struct sqlConnection *sqlFailoverConn(struct sqlConnection *sc); /* returns the failover connection of a connection or NULL. * (Needed because the sqlConnection is not in the .h file) */ #endif /* JKSQL_H */