[Bio] / Clearinghouse / utils.pm Repository:
ViewVC logotype

Diff of /Clearinghouse/utils.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4, Thu May 5 14:07:11 2005 UTC revision 1.5, Thu May 5 16:58:31 2005 UTC
# Line 16  Line 16 
16  our $fig;  our $fig;
17    
18  our @EXPORT = qw(check_types  our @EXPORT = qw(check_types
19                     lock_init
20                     type_init
21                   get_lock                   get_lock
22                   release_lock                   release_lock
23                   get_page_header                   get_page_header
# Line 99  Line 101 
101          return @$ar; #length = 0, if no rows          return @$ar; #length = 0, if no rows
102  }  }
103    
104    sub lock_init {
105        my ($dbh) = @_;
106    
107        my $sth = $dbh->{_dbh}->prepare(q(INSERT into locks (name, lock)
108                                          VALUES (?, ?)
109                                         )) or die $dbh->{_dbh}->errstr;
110        $sth->execute("genome", 0);
111        $sth->execute("feature", 0);
112    }
113    
114    sub type_init {
115        my ($dbh) = @_;
116    
117        my $sth = $dbh->{_dbh}->prepare(q(INSERT into types (type)
118                                          VALUES (?)
119                                         )) or die $dbh->{_dbh}->errstr;
120    
121        # Initialize the known set of types.
122        #
123    
124        $sth->execute("GENOME");
125        $sth->execute("ANNOTATION");
126        $sth->execute("SUBSYSTEM");
127        $sth->execute("1-SUBSYSTEM");
128        $sth->execute("SIMS");
129        $sth->execute("FEATURE");
130    }
131    
132    
133  sub get_lock {  sub get_lock {

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3