| 101 | } |
| 102 | |
| 103 | static void gp_cleanup(GP_Proj *lp, cbm_store_t *store) { |
| 104 | if (store) cbm_store_close(store); |
| 105 | if (lp->srv) { cbm_mcp_server_free(lp->srv); lp->srv = NULL; } |
| 106 | free(lp->project); lp->project = NULL; |
| 107 | th_rmtree(lp->tmpdir); |
| 108 | unlink(lp->dbpath); |
| 109 | char wal[600], shm[600]; |
| 110 | snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath); |
| 111 | snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath); |
| 112 | unlink(wal); unlink(shm); |
| 113 | } |
| 114 | |
| 115 | /* Count graph nodes by label. Returns -1 on query error. */ |
| 116 | static int gp_count_label(cbm_store_t *store, const char *project, const char *label) { |
no test coverage detected