IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 2, 2007, 5:21:28 PM (19 years ago)
Author:
jhoblitt
Message:

overhaul Nebulous::Client->cull()
add the number of instances to ->stat_object()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm

    r13177 r13180  
    11# Copyright (c) 2004  Joshua Hoblitt
    22#
    3 # $Id: SQL.pm,v 1.35 2007-05-03 01:49:55 jhoblitt Exp $
     3# $Id: SQL.pm,v 1.36 2007-05-03 03:21:28 jhoblitt Exp $
    44
    55package Nebulous::Server::SQL;
     
    5353    get_object          => qq{
    5454        SELECT
    55             storage_object.so_id,
     55            so_id,
    5656            ext_id,
    5757            read_lock,
     
    6363        USING (so_id)
    6464        WHERE ext_id = ?
     65    },
     66    stat_object          => qq{
     67        SELECT
     68            storage_object.so_id,
     69            storage_object.ext_id,
     70            read_lock,
     71            write_lock,
     72            storage_object_attr.epoch,
     73            storage_object_attr.mtime,
     74            COUNT(instance.so_id) as instances
     75        FROM storage_object
     76        JOIN storage_object_attr
     77            USING (so_id)
     78        JOIN instance
     79            USING (so_id)
     80        WHERE ext_id = ?
     81        GROUP BY storage_object.so_id
    6582    },
    6683    # Note: this sets an update lock
Note: See TracChangeset for help on using the changeset viewer.