Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > Programming > Perl Modules

    DBIx::SQL::Abstract 0.07

    Download button

    No screenshots available
    Downloads: 313  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Alejandro Juarez | More programs
    Perl Artistic License / FREE
    October 14th, 2006, 08:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    DBIx::SQL::Abstract description

    A Perl module that provides a convenient abstraction layer to a database

    DBIx::SQL::Abstract is a Perl module that provides a convenient abstraction layer to a database.

    SYNOPSIS

    use DBIx::SQL::Abstract;

    my $dbh = DBIx::SQL::Abstract->new( �cfg );

    Building SQL Abstractions.

    my($query, @bind) = $dbh->select($table, @fields, %where, @order);
    my($query, @bind) = $dbh->insert($table, %fieldvals || @values);
    my($query, @bind) = $dbh->update($table, %fieldvals, %where);
    my($query, @bind) = $dbh->delete($table, %where);

    Using DBI methods

    my $sth = $dbh->prepare($query);
    $sth->execute(@bind_params);
    ...
    my $rc = $dbh->begin_work;
    my $rc = $dbh->commit;
    my $rc = $dbh->rollback;
    my $rc = $dbh->disconnect;

    Anything else DBI method can be used, by Example:

    my $err = $dbh->err;
    my $err = $dbh->errstr;
    my $rv = $dbh->state;
    my $rc = $dbh->DESTROY;


    The intention of this module is to join some methods from the DBI and the SQL::Abstract modules, for a convenient and easy use.

    To begin, we create an object, but first we must create a hash which contains the database parameters as follows.

    my �cfg = { PrintError => 1,
    RaiseError => 0,
    AutoCommit => 0,
    ChopBlanks => 1
    driver => 'Pg',
    dbname => 'db',
    host => undef,
    port => undef,
    user => 'user',
    passwd => undef
    };

    Notice that this parameters are set as default unless you set your required values. my $dbh = DBIx::SQL::Abstract->new( �cfg );

    This object automatically creates the connection with the database, and gets the methods listed above.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    abstraction layer | database layer | Perl module | module | database | abstraction



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM