Does Parrot have a database interface or API?

A quick search gave me this Parrot DBDI announcement from Jan 2004 and the dbdi-dev mailing list , which seems to be long dead. Is Parrot DBDI still under development? Anyone working with a different API or database frontend for Parrot?

0


source to share


2 answers


DBDI has tried to create a database driver interface such as the existing DBI and DBD modules. He died, so the developers are now using the existing interface - Java JDBI. Two such developers are Tim Bunce (who worked on DBI 1 but didn't have much time to work on its sequel) and Simon Cosens:

http://perlbuzz.com/2008/12/database-access-in-perl-6-is-coming-along-nicely.html

use DBDI;
my $conn = DBDI::DriverManager.getConnection(
    "dbdi:SQLite3:test.db", "", "");
my $stm = $conn.createStatement();
my $rs = $stm.executeUpdate("CREATE TABLE foo (bar, baz)");
my $stm = $conn.prepareStatement(
    "    INSERT INTO foo (bar, baz) VALUES (?, ?)");
$stm.setColumn(1, 123);
$stm.setColumn(2, "Thingy");
$stm.executeUpdate();

      

This module should be available for all Parrot languages, not just Perl 6.




In fact, for Perl 6 we will probably see the SQL quote statement so you can do things like this:

$conn.prepareStatement( Q:sql<INSERT INTO foo (bar, baz) VALUES($bar, $baz)> );

      

And of course, in Perl 6, quoting modifiers like Q: sql can be abbreviated, for example. to qs <> or sql <>

+1


source


From the DBI :: Roadmap 1.607 manual from new 2004:

The main part of the work will be translating the DBI C database and Perl class into Parrot PIR or a suitable language that generates PIR. The project stalled due to the fact that Parrot lacked key functionality at the time. This has been resolved, but the project has not been relaunched yet.

This post from Darren Duncan in May 2005:



I believe it will start again soon now. See, A number of basic prerequisites are missing online, and therefore with those who can get started.

I cannot find anything more recent than this. The parrot itself is kind of glacial in its development, so it is possible for it to be compatible with the Parrot platform, DBDI too. :-)

+1


source







All Articles