This is the 1st release of HDB (Hybrid Database) at CPAN:
http://search.cpan.org/~gmpassos/HDB-1.0/

=head1 NAME

HDB - Hybrid Database - Handles multiple databases with the same interface.

=head1 DESCRIPTION

HDB is an easy, fast and powerfull way to access any type of database. With
it you don't need to know SQL, DBI, or the type of the database that you are
using.
HDB will make all the work around between the differences of any database.
>From HDB you still can use DBI and SQL commands if needed, but this won't be
portable between database types.
If you use only HDB querys (not DBI) you can change the database that you
are using, Server and OS without change your code! For example, you can
test/develope your code in your desktop (let's say Win32) with SQLite, and
send your code to the Server (Linux), where you use MySQL.

=head1 USAGE

  use HDB ;

  my $HDB = HDB->new(
  type => 'sqlite' ,
  file => 'test.db' ,
  ) ;

  ... or ...

  my $HDB = HDB->new(
  type => 'mysql' ,
  host => 'some.domain.com' ,
  user => 'foo' ,
  pass => 'bar' ,
  ) ;

  $HDB->create('users',[
  'user' => 100 ,
  'name' => 100 ,
  'age' => 'int(200)' ,
  'more' => 1024*4 ,
  ]);

  $HDB->insert( 'users' , {
  user => 'joe' ,
  name => 'joe tribianny' ,
  age  => '30' ,
  } ) ;

  ... or ...

  $HDB->users->insert( {
  user => 'joe' ,
  name => 'joe tribianny' ,
  age  => '30' ,
  } ) ;


  ...

  my @sel = $HDB->select('users' , 'name =~ joe' , '@%' ) ;

  foreach my $sel_i ( @sel ) {
    my %cols = %$sel_i ;
    ...
  }

  ...

  my $hdbhandle = $HDB->select('users' , '<%>');

  while( my %cols = <$hdbhandle> ) {
    foreach my $Key ( keys %cols ) { print "$Key = $cols{$Key}\n" ;}
    ...
  }

  ...

  $HDB->update('users' , 'user eq joe' , { user => 'JoeT' } ) ;

  ...

  $HDB->disconnect ;



Reply via email to