8c8f63b91ea88283551e091dc95d5cebad182a84 galt Thu Aug 6 00:08:15 2015 -0700 adding setting HGDB_PROF which can over-ride the default profile value of "db" for any utility using jksql. diff --git src/hg/inc/jksql.h src/hg/inc/jksql.h index e3119cf..361bf57 100644 --- src/hg/inc/jksql.h +++ src/hg/inc/jksql.h @@ -14,33 +14,31 @@ * These routines will all print an error message and abort if * there's a problem, cleaning up open connections, etc. on abort * (or on program exit). Do a pushAbortHandler if you want to * catch the aborts. The error messages from bad SQL syntax * are actually pretty good (they're just passed on from * mySQL). */ #ifndef JKSQL_H #define JKSQL_H #include "sqlNum.h" #include "sqlList.h" #include "hash.h" #include "dystring.h" -extern char *defaultProfileName; // name of default profile - -/* create a new profile object (does not include ->dbs) */ +char *getDefaultProfileName(); // name of default profile struct sqlConnection *sqlConnect(char *database); /* Connect to database on default host as default user. */ struct sqlConnection *sqlMayConnect(char *database); /* Connect to database on default host as default user. * Return NULL (don't abort) on failure. */ struct sqlConnection *sqlConnectProfile(char *profileName, char *database); /* Connect to profile or database using the specified profile. Can specify * profileName, database, or both. The profile is the prefix to the host, * user, and password variables in .hg.conf. For the default profile of "db", * the environment variables HGDB_HOST, HGDB_USER, and HGDB_PASSWORD can * override. */