src/dbfs/dbfs.h
branchnew-evsql
changeset 48 8b019d191353
parent 42 40a3b13ffc9d
child 49 bb2ff0d2d343
equal deleted inserted replaced
47:8c6c459eacb7 48:8b019d191353
    46  * Returns;
    46  * Returns;
    47  *  -1  if the query failed, the columns/rows do not match
    47  *  -1  if the query failed, the columns/rows do not match
    48  *  0   the results match
    48  *  0   the results match
    49  *  1   there were no results (zero rows)
    49  *  1   there were no results (zero rows)
    50  */
    50  */
    51 int _dbfs_check_res (const struct evsql_result_info *res, size_t rows, size_t cols);
    51 int _dbfs_check_res (struct evsql_result *res, size_t rows, size_t cols);
    52 
    52 
    53 /*
    53 /*
    54  * Same as _dbfs_check_res, but returns ENOENT/EIO directly
    54  * Same as _dbfs_check_res, but returns ENOENT/EIO directly
    55  */
    55  */
    56 err_t dbfs_check_result (const struct evsql_result_info *res, size_t rows, size_t cols);
    56 err_t dbfs_check_result (struct evsql_result *res, size_t rows, size_t cols);
    57 
    57 
    58 /*
    58 /*
    59  * Fill a `struct state` with info retrieved from a SQL query.
    59  * Fill a `struct state` with info retrieved from a SQL query.
    60  *
    60  *
    61  * The result must contain four columns, starting at the given offset:
    61  * The result must contain four columns, starting at the given offset:
    62  *  inodes.type, inodes.mode, inodes.size, count(*) AS nlink
    62  *  inodes.type, inodes.mode, inodes.size, count(*) AS nlink
    63  *
    63  *
    64  * Note that this does not fill the st_ino field
    64  * Note that this does not fill the st_ino field
    65  */
    65  */
    66 int _dbfs_stat_info (struct stat *st, const struct evsql_result_info *res, size_t row, size_t col_offset);
    66 int _dbfs_stat_info (struct stat *st, struct evsql_result *res, size_t row, size_t col_offset);
    67 
    67 
    68 /** interrupt.c 
    68 /** interrupt.c 
    69  *  
    69  *  
    70  * Fuse interrupts are handled using fuse_req_interrupt_func. Calling this registers a callback function with the req,
    70  * Fuse interrupts are handled using fuse_req_interrupt_func. Calling this registers a callback function with the req,
    71  * which may or may not be called either by fuse_req_interrupt_func, or later on via evfuse's event handler. It is
    71  * which may or may not be called either by fuse_req_interrupt_func, or later on via evfuse's event handler. It is