src/dbfs/dirop.c
changeset 33 c71f3053c714
parent 30 d8fabd347a8e
child 34 460f995d3769
equal deleted inserted replaced
32:90e14e0df133 33:c71f3053c714
    92     
    92     
    93     // first fetch info about the dir itself
    93     // first fetch info about the dir itself
    94     const char *sql =
    94     const char *sql =
    95         "SELECT"
    95         "SELECT"
    96         " file_tree.parent, inodes.type"
    96         " file_tree.parent, inodes.type"
    97         " FROM file_tree LEFT OUTER JOIN inodes ON (file_tree.inode = inodes.ino)"
    97         " FROM file_tree LEFT OUTER JOIN inodes ON (file_tree.ino = inodes.ino)"
    98         " WHERE file_tree.inode = $1::int4";
    98         " WHERE file_tree.ino = $1::int4";
    99 
    99 
   100     static struct evsql_query_params params = EVSQL_PARAMS(EVSQL_FMT_BINARY) {
   100     static struct evsql_query_params params = EVSQL_PARAMS(EVSQL_FMT_BINARY) {
   101         EVSQL_PARAM ( UINT32 ),
   101         EVSQL_PARAM ( UINT32 ),
   102 
   102 
   103         EVSQL_PARAMS_END
   103         EVSQL_PARAMS_END
   253 
   253 
   254     // select all relevant file entries
   254     // select all relevant file entries
   255     const char *sql = 
   255     const char *sql = 
   256         "SELECT"
   256         "SELECT"
   257         " file_tree.\"offset\", file_tree.name, inodes.ino, inodes.type"
   257         " file_tree.\"offset\", file_tree.name, inodes.ino, inodes.type"
   258         " FROM file_tree LEFT OUTER JOIN inodes ON (file_tree.inode = inodes.ino)"
   258         " FROM file_tree LEFT OUTER JOIN inodes ON (file_tree.ino = inodes.ino)"
   259         " WHERE file_tree.parent = $1::int4 AND file_tree.\"offset\" >= $2::int4"
   259         " WHERE file_tree.parent = $1::int4 AND file_tree.\"offset\" >= $2::int4"
   260         " LIMIT $3::int4";
   260         " LIMIT $3::int4";
   261 
   261 
   262     static struct evsql_query_params params = EVSQL_PARAMS(EVSQL_FMT_BINARY) {
   262     static struct evsql_query_params params = EVSQL_PARAMS(EVSQL_FMT_BINARY) {
   263         EVSQL_PARAM ( UINT32 ),
   263         EVSQL_PARAM ( UINT32 ),