equal
deleted
inserted
replaced
20 const char *db_conninfo; |
20 const char *db_conninfo; |
21 struct evsql *db; |
21 struct evsql *db; |
22 |
22 |
23 struct evfuse *ev_fuse; |
23 struct evfuse *ev_fuse; |
24 }; |
24 }; |
|
25 |
|
26 // used for error returns |
|
27 typedef int err_t; |
25 |
28 |
26 // XXX: not sure how this should work |
29 // XXX: not sure how this should work |
27 #define CACHE_TIMEOUT 1.0 |
30 #define CACHE_TIMEOUT 1.0 |
28 |
31 |
29 // columns used for stat_info |
32 // columns used for stat_info |
48 * 1 there were no results (zero rows) |
51 * 1 there were no results (zero rows) |
49 */ |
52 */ |
50 int _dbfs_check_res (const struct evsql_result_info *res, size_t rows, size_t cols); |
53 int _dbfs_check_res (const struct evsql_result_info *res, size_t rows, size_t cols); |
51 |
54 |
52 /* |
55 /* |
|
56 * Same as _dbfs_check_res, but returns ENOENT/EIO directly |
|
57 */ |
|
58 err_t dbfs_check_result (const struct evsql_result_info *res, size_t rows, size_t cols); |
|
59 |
|
60 /* |
53 * Fill a `struct state` with info retrieved from a SQL query. |
61 * Fill a `struct state` with info retrieved from a SQL query. |
54 * |
62 * |
55 * The result must contain four columns, starting at the given offset: |
63 * The result must contain four columns, starting at the given offset: |
56 * inodes.type, inodes.mode, inodes.size, count(*) AS nlink |
64 * inodes.type, inodes.mode, inodes.size, count(*) AS nlink |
57 * |
65 * |