IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 2, 2007, 3:44:24 PM (19 years ago)
Author:
jhoblitt
Message:

better paramter checking
overhaul instance table
add ->_is_valid_object_key() method
change ->find_instances() to check it's params and only return instances on mounted & available volumes

File:
1 edited

Legend:

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

    r13131 r13173  
    11# Copyright (c) 2004  Joshua Hoblitt
    22#
    3 # $Id: SQL.pm,v 1.33 2007-05-02 20:53:42 jhoblitt Exp $
     3# $Id: SQL.pm,v 1.34 2007-05-03 01:44:24 jhoblitt Exp $
    44
    55package Nebulous::Server::SQL;
     
    144144        WHERE so_id = ?
    145145    },
    146     get_object_instances        => qq{
    147         SELECT storage_object.so_id,
    148             uri, assigned_location
    149         FROM storage_object
    150         LEFT JOIN instance
    151         USING (so_id)
    152         WHERE ext_id = ?
     146    get_object_instances    => qq{
     147        SELECT
     148            storage_object.so_id,
     149            uri,
     150            assigned_vol_id
     151        FROM storage_object
     152        JOIN instance
     153            USING (so_id)
     154        JOIN mountedvol
     155            USING(vol_id)
     156        WHERE ext_id = ?
     157            AND available = ?
     158    },
     159    get_object_instances_by_vol_name => qq{
     160        SELECT
     161            storage_object.so_id,
     162            uri,
     163            assigned_vol_id
     164        FROM storage_object
     165        JOIN instance
     166            USING (so_id)
     167        JOIN mountedvol
     168            USING(vol_id)
     169        WHERE ext_id = ?
     170            AND name = ?
     171            AND available = ?
    153172    },
    154173    get_storage_volume_byname   => qq{
     
    284303    uri VARCHAR(255) NOT NULL,
    285304    sha1sum CHAR(40) ASCII,
    286     assigned_location BOOL,
     305    assigned_vol_id INT,
    287306    epoch TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    288307    mtime TIMESTAMP,
Note: See TracChangeset for help on using the changeset viewer.