emulating DBI over Rosetta



This email is a heads-up.

A couple months ago I announced that I was going to experiment with cross-cpan refactoring where I would update a variety of DBI wrappers to use my SQL::Routine module internally. Since then I have changed my mind and decided not to do this, largely due to the complexity of the task, including that many of the modules are regularly being updated.

Instead, I will be going ahead with a plan I had much earlier on which is to make a new Pure Perl module that is a wrapper for Rosetta that emulates DBI, probably to be named Rosetta::Emulator::DBI. Then any other programs or modules that use DBI (including all the aforementioned wrapper modules) should be able to use this as a drop-in replacement.

What will happen behind the scenes with your database instructions that didn't happen before is that their SQL strings will be completely parsed into a SQL::Routine model and then re-assembled into new SQL strings which are actually executed, assuming your actual database engine is unchanged.

The advantage to you of having interjected Rosetta into your communications with the database is that you should be able to substitute any other database engine for your original one and your application will continue to work without any changes on its part. Similarly, your application will then be able to work unchanged with storage engines that it would have never worked with before except with large changes; this includes databases that don't use SQL as their native instruction set, or for which a DBI driver doesn't exist.

I expect to have this functional with a few database products by the end of June.

As a side effect, since I am maintaining native Perl 6 versions of my modules in parallel with the Perl 5 ones, porting your applications to Perl 6 and/or Parrot later can also be assisted by using them.

Any feedback or questions or offers of assistence are welcome.

Have a good day. -- Darren Duncan
.



Relevant Pages

  • RE: fetchrow_array performance
    ... I agree - set RasieError. ... it is impossible to tell what is going on in the database without a 10046 trace. ... You aren't error checking your dbi statements - do you have RaiseError ... sender of the delivery error by replying to this message, or notify us by ...
    (perl.dbi.users)
  • Re: Evaluated "require $database" not found.
    ... DBI Error 1046: No database selected ... What I have found is that if the spaceare removed as per the correct syntax, then the DBI_errorhandler will trap and report a connection failure if a non-existent database is specified, as per this example: ... This requires that you first have an installation of mysql setup on a host ...
    (perl.dbi.users)
  • Re: Cant call method "prepare" on an undefined value
    ... Somehow you managed to have an undefined value instead of a DBI database handle in front of ->prepare, which is burried deep inside Oraperl.pm. ... Oracle HTTP Server at Server B. Both server are Solaris server. ... I have installed DBI and DBD into Server B and setup the oraperl in my perl script. ...
    (perl.dbi.users)
  • Balasan: RE: Balasan: RE: Balasan: RE: Balasan: RE: cant execute "use $database"
    ... dictionary of the each database of my MSSQL. ... to load it -- DBI will load it for you. ... Subject: Balasan: RE: Balasan: RE: Balasan: RE: ...
    (perl.dbi.users)
  • RE: fetchrow_array performance
    ... takes a few seconds to return the rows that makes your selection ... Not sure how big your database is but for anything other than ... This will create a trace file in the ... You aren't error checking your dbi statements - do you have RaiseError ...
    (perl.dbi.users)