Simon Wistow (deflatermouse) wrote,
Simon Wistow
deflatermouse

SQLite(2?)

SQLite version <=0.31 is libsqlite v2 as is SQLite2 but SQLite > 0.31 is libsqlite v3.

Still with me?

Me neither.

Actually I get it and I even sort of get the reasons for doing it but it still makes me feel icky. The bad thing is that whilst SQLite2 is supposed to be fully backwards I was getting errors about "can't find object method" and ...

Oh, blinding flash of insight.

... The problem ended up being in Class::DBI::BaseDSN which does a check for dbi:([^:]+): and then uses $1 to initialise the Class::DBI driver. Except there was no Class::DBI::SQLite2.

The solution I used was to copy Class::DBI::SQLite over as Class/DBI/SQlite2.pm and insert 2s judiciously. This may not be the best way although the other quick solution was to do

    $driver = 'SQLite' if $driver eq 'SQLite2'; 

or the moral equivalent which just seems hacky.

Tags: dbi driver, flash, icky, insight, sqlite
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments