Mercurial > sci
comparison scid/db.h @ 27:dae2de19ca5d
misc: switch to JSON everywhere
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 03 Aug 2022 15:18:09 +0200 |
parents | lib/db.h@7e10cace67a3 |
children | 081e1c258e64 |
comparison
equal
deleted
inserted
replaced
26:7e10cace67a3 | 27:dae2de19ca5d |
---|---|
1 /* | |
2 * db.h -- scid database access | |
3 * | |
4 * Copyright (c) 2021 David Demelier <markand@malikania.fr> | |
5 * | |
6 * Permission to use, copy, modify, and/or distribute this software for any | |
7 * purpose with or without fee is hereby granted, provided that the above | |
8 * copyright notice and this permission notice appear in all copies. | |
9 * | |
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
17 */ | |
18 | |
19 #ifndef SCI_DB_H | |
20 #define SCI_DB_H | |
21 | |
22 #include <stdint.h> | |
23 | |
24 #include <jansson.h> | |
25 | |
26 int | |
27 db_open(const char *); | |
28 | |
29 int | |
30 db_job_add(json_t *); | |
31 | |
32 json_t * | |
33 db_job_todo(const char *); | |
34 | |
35 json_t * | |
36 db_job_list(const char *); | |
37 | |
38 int | |
39 db_jobresult_add(json_t *); | |
40 | |
41 json_t * | |
42 db_jobresult_list_by_job(intmax_t); | |
43 | |
44 json_t * | |
45 db_jobresult_list_by_job_group(intmax_t); | |
46 | |
47 json_t * | |
48 db_jobresult_list_by_worker(const char *); | |
49 | |
50 int | |
51 db_project_save(json_t *); | |
52 | |
53 json_t * | |
54 db_project_list(void); | |
55 | |
56 json_t * | |
57 db_project_find(const char *); | |
58 | |
59 int | |
60 db_worker_save(json_t *); | |
61 | |
62 json_t * | |
63 db_worker_list(void); | |
64 | |
65 json_t * | |
66 db_worker_find(const char *); | |
67 | |
68 void | |
69 db_finish(void); | |
70 | |
71 #endif /* !SCI_DB_H */ |