/[cvs]/nfo/perl/libs/Data/Storage.pm
ViewVC logotype

Diff of /nfo/perl/libs/Data/Storage.pm

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

revision 1.11 by joko, Wed Dec 11 06:53:19 2002 UTC revision 1.13 by joko, Tue Dec 17 21:54:12 2002 UTC
# Line 7  Line 7 
7  ############################################  ############################################
8  #  #
9  #  $Log$  #  $Log$
10    #  Revision 1.13  2002/12/17 21:54:12  joko
11    #  + feature when using Tangram:
12    #    + what? each object created should delivered with a globally(!?) unique identifier (GUID) besides the native tangram object id (OID)
13    #        + patched Tangram::Storage (jonen)
14    #        + enhanced Data::Storage::Schema::Tangram (joko)
15    #        + enhanced Data::Storage::Handler::Tangram 'sub getObjectByGuid' (jonen)
16    #    + how?
17    #        + each concrete (non-abstract) class gets injected with an additional field/property called 'guid' - this is done (dynamically) on schema level
18    #        + this property ('guid') gets filled on object creation/insertion from 'sub Tangram::Storage::_insert' using Data::UUID from CPAN
19    #        + (as for now) this property can get accessed by calling 'getObjectByGuid' on the already known storage-handle used throughout the application
20    #
21    #  Revision 1.12  2002/12/12 02:50:15  joko
22    #  + this now (unfortunately) needs DBI for some helper functions
23    #  + TODO: these have to be refactored to another scope! (soon!)
24    #
25  #  Revision 1.11  2002/12/11 06:53:19  joko  #  Revision 1.11  2002/12/11 06:53:19  joko
26  #  + updated pod  #  + updated pod
27  #  #
# Line 199  use warnings; Line 214  use warnings;
214  use Data::Storage::Locator;  use Data::Storage::Locator;
215  use Data::Dumper;  use Data::Dumper;
216    
217    # TODO: wipe out!
218    use DBI;
219    
220  # TODO: actually implement level (integrate with Log::Dispatch)  # TODO: actually implement level (integrate with Log::Dispatch)
221  my $TRACELEVEL = 0;  my $TRACELEVEL = 0;
222    
# Line 364  sub getDbName { Line 382  sub getDbName {
382    return $database_name;    return $database_name;
383  }  }
384    
385    sub testAvailability {
386      my $self = shift;
387      my $status = $self->testDsn();
388      $self->{locator}->{status}->{available} = $status;
389      return $status;
390    }
391    
392    sub isConnected {
393      my $self = shift;
394      # TODO: REVIEW!
395      return 1 if $self->{STORAGEHANDLE};
396    }
397    
398  sub testDsn {  sub testDsn {
399    my $self = shift;    my $self = shift;
400    my $dsn = $self->{locator}->{dbi}->{dsn};    my $dsn = $self->{locator}->{dbi}->{dsn};
# Line 381  sub testDsn { Line 412  sub testDsn {
412    }    }
413  }  }
414    
 sub testAvailability {  
   my $self = shift;  
   my $status = $self->testDsn();  
   $self->{locator}->{status}->{available} = $status;  
   return $status;  
 }  
   
   
415  sub dropDb {  sub dropDb {
416    my $self = shift;    my $self = shift;
417    my $dsn = $self->{locator}->{dbi}->{dsn};    my $dsn = $self->{locator}->{dbi}->{dsn};
# Line 416  sub dropDb { Line 439  sub dropDb {
439    return $ok;    return $ok;
440  }  }
441    
 sub isConnected {  
   my $self = shift;  
   return 1 if $self->{STORAGEHANDLE};  
 }  
   
442  1;  1;
443  __END__  __END__
444    
# Line 547  Compare schema (structure diff) with dat Line 565  Compare schema (structure diff) with dat
565           - 'sub getACLByMethodname($id, $context)'           - 'sub getACLByMethodname($id, $context)'
566           - 'sub getACLByName($id, $context)'           - 'sub getACLByName($id, $context)'
567              ( would require a kinda registry to look up these very names pointing to arbitrary locations (code, data, ...) )              ( would require a kinda registry to look up these very names pointing to arbitrary locations (code, data, ...) )
568      - add more hooks and various levels
569      - better integrate introduced 'getObjectByGuid'-mechanism from Data::Storage::Handler::Tangram
570    
571    
572  =head3 LINKS / REFERENCES  =head3 LINKS / REFERENCES

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.13

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed