DBD::Sprite now supports basic joins!

[email protected] ((PerlDiscuss - Perl Newsgroups and mailing lists)) 8 Mar 2004 16:05:10 -0000
Newsgroups perl.dbi.announce
Organization PerlDiscuss.com
Message-ID <[email protected]>
I am pleased to announce that DBD::Sprite now supports basic 2-table
inner-joins as of version 0.50, which is now making it's way onto CPAN. 
This is my first stab at joins and it should be considered alpha.  This is
the only type of joins currently supported.  Comments, bug-reports,
patches welcome!

Enjoy!


Jim Turner

Example:  If one had the following 2 tables:

Students:

first            last         age
================ ============ ===
Joe              Smith        20
Susan            Mitchel      21
Bob              Miller       19
Richard          Smith        21

Employees:

first            last         company
================ ============ ================
Bob              Jones        Acme
Mike             Smith        GM
Mark             Williams     Red Hat

One can now do a query like:

    select s.first, s.last, e.company, s.age from st order by s.first,
e.companyudents s, employees e where s.last = e.last order by s.first,
e.company

This would return:

Joe      Smith   GM   20
Richard  Smith   GM   21