IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 4, 2005, 4:35:45 PM (21 years ago)
Author:
jhoblitt
Message:

split storage_object table into storage_object & storage_object_attr

File:
1 edited

Legend:

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

    r4874 r5478  
    11# Copyright (c) 2004  Joshua Hoblitt
    22#
    3 # $Id: Server.pm,v 1.10 2005-08-25 01:44:32 jhoblitt Exp $
     3# $Id: Server.pm,v 1.11 2005-11-05 02:35:45 jhoblitt Exp $
    44
    55package Nebulous::Server;
     
    103103
    104104    my $uri;
     105    my $object_id;
    105106    my $ins_id;
    106107
     
    109110            # create storage_object
    110111            my $query = $db->prepare_cached( $sql->new_object );
    111             $query->execute( $key, $class, $comment );
     112            $query->execute( 'NULL', $key );
     113        }
     114
     115        {
     116            # get object ID
     117            my $query = $db->prepare_cached( $sql->last_insert_id );
     118            $query->execute;
     119            ( $object_id ) = $query->fetchrow_array;
     120
     121            $query->finish;
     122        }
     123
     124        {
     125            # create storage_object_attr
     126            my $query = $db->prepare_cached( $sql->new_object_attr );
     127            $query->execute( $object_id, $class, $comment );
    112128        }
    113129
Note: See TracChangeset for help on using the changeset viewer.