-
Notifications
You must be signed in to change notification settings - Fork 0
/
db_ops.h
45 lines (33 loc) · 1 KB
/
db_ops.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* This file contains a number of useful operations based on the db
layer below, such as keeping a list of recent updates, and so
on. As I develop advogato, it's likely that I'll put in schemas for
relations, ontology, indexing, and some other things. */
int
virgule_add_recent (apr_pool_t *p, Db *db, const char *key, const char *val, int n_max, int dup);
/* Relations */
typedef struct _DbRelation DbRelation;
typedef struct _DbField DbField;
typedef struct _DbSelect DbSelect;
typedef enum {
DB_FIELD_INDEX = 1,
DB_FIELD_UNIQUE = 2
} DbFieldFlags;
typedef enum {
DB_REL_DUMMY
/* I'm sure there is stuff in here relevant to date handling */
} DbRelFlags;
struct _DbField {
char *name;
char *prefix;
DbFieldFlags flags;
};
struct _DbRelation {
char *name;
int n_fields;
DbField *fields;
DbRelFlags flags;
};
int
virgule_db_relation_put (apr_pool_t *p, Db *db, const DbRelation *rel, const char **values);
void
virgule_remove_recent (VirguleReq *vr, const char *key, const char *val);