f558f8888fc486e82384f05665be19c6f8e5f452 markd Wed Dec 15 21:00:16 2010 -0800 assign ids in seq and extFile tables locally rather than globally (RM #26) diff --git src/hg/inc/hgRelate.h src/hg/inc/hgRelate.h index 7b0a82d..551241e 100644 --- src/hg/inc/hgRelate.h +++ src/hg/inc/hgRelate.h @@ -9,47 +9,53 @@ #ifndef DNASEQ_H #include "dnaseq.h" #endif #ifndef UNFIN_H #include "unfin.h" #endif #ifndef JKSQL_H #include "jksql.h" #endif typedef unsigned int HGID; /* A database ID. */ -HGID hgIdQuery(struct sqlConnection *conn, char *query); -/* Return first field of first table as HGID. 0 return ok. */ - -HGID hgRealIdQuery(struct sqlConnection *conn, char *query); -/* Return first field of first table as HGID- abort if 0. */ +void hgHistoryComment(struct sqlConnection *conn, char *comment, ...) +/* Add comment to history table. */ +#if defined(__GNUC__) +__attribute__((format(printf, 2, 3))) +#endif +; -void hgHistoryComment(struct sqlConnection *conn, char *comment, ...); -/* Add comment to history table. Does not lock the process. */ +void hgHistoryCommentWithIds(struct sqlConnection *conn, int startId, int endId, char *comment, ...) +/* Add comment to history table, with id range. */ +#if defined(__GNUC__) +__attribute__((format(printf, 4, 5))) +#endif +; struct sqlConnection *hgStartUpdate(char *db); -/* Open and connection and get next global id from the history table */ +/* Open and connection and lock the history table */ -void hgEndUpdate(struct sqlConnection **pConn, char *comment, ...); -/* Finish up connection with a printf format comment. */ - -HGID hgNextId(void); -/* Get next unique id. (Should only be called after hgStartUpdate). */ +void hgEndUpdate(struct sqlConnection **pConn, int startId, int endId, char *comment, ...) +/* Finish up connection with a printf format comment and optional id range */ +#if defined(__GNUC__) +__attribute__((format(printf, 4, 5))) +#endif +; FILE *hgCreateTabFile(char *tmpDir, char *tableName); /* Open a tab file with name corresponding to tableName in tmpDir. If tmpDir is NULL, * use TMPDIR environment, or "/var/tmp" */ int hgUnlinkTabFile(char *tmpDir, char *tableName); /* Unlink tab file. If tmpDir is NULL, use TMPDIR environment, or "/var/tmp" */ void hgLoadTabFile(struct sqlConnection *conn, char *tmpDir, char *tableName, FILE **tabFh); /* Load tab delimited file corresponding to tableName. close fh if not NULL. * If tmpDir is NULL, use TMPDIR environment, or "/var/tmp"*/ void hgLoadNamedTabFile(struct sqlConnection *conn, char *tmpDir, char *tableName, char *fileName, FILE **tabFh);