src/dbfs/core.c
changeset 33 c71f3053c714
parent 31 7804cd7b5cd5
child 36 56427f22e969
equal deleted inserted replaced
32:90e14e0df133 33:c71f3053c714
    55     
    55     
    56     // query and params
    56     // query and params
    57     const char *sql = 
    57     const char *sql = 
    58         "SELECT"
    58         "SELECT"
    59         " inodes.ino, " DBFS_STAT_COLS
    59         " inodes.ino, " DBFS_STAT_COLS
    60         " FROM file_tree INNER JOIN inodes ON (file_tree.inode = inodes.ino)"
    60         " FROM file_tree INNER JOIN inodes ON (file_tree.ino = inodes.ino)"
    61         " WHERE file_tree.parent = $1::int4 AND file_tree.name = $2::varchar"
    61         " WHERE file_tree.parent = $1::int4 AND file_tree.name = $2::varchar";
    62         " GROUP BY inodes.ino, inodes.type, inodes.mode, data";
       
    63     
    62     
    64     static struct evsql_query_params params = EVSQL_PARAMS(EVSQL_FMT_BINARY) {
    63     static struct evsql_query_params params = EVSQL_PARAMS(EVSQL_FMT_BINARY) {
    65         EVSQL_PARAM ( UINT32 ),
    64         EVSQL_PARAM ( UINT32 ),
    66         EVSQL_PARAM ( STRING ),
    65         EVSQL_PARAM ( STRING ),
    67 
    66