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

  • This is a call to all my past resignations

    My building, like many here in the fair City O' Fog, has a door entry system which calls a phone number - I can then buzz the door open using the…

  • You Get Me Closer To God

    And ooooooooooooh, the music puns get worse and worse. So, at work we stumbled across an interesting Perlism. Well, interesting if you're a huge…

  • All Tomorrow's Parties

    After my last bit of Calendar fiddling I was left slightly disgusted by the state of the code. In my defence it was written over the course of a…

  • 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