#18 Rearchitect the DB backends

General (16)

The LXR index DB backends all use DBI, which is perfect, but they don't take enough advantage of it and thus end up duplicating a significant amount of code with all the problems that generally brings.

Perl's DBI is ALREADY a generic front-end for SQL databases of all different types, so having separate LXR::Index::* subclasses for each database is largely unnecessary: all databases can use the DBI interface almost exactly the same way.

There are minor differences, though, so it's not true that we can get rid of the LXR::Index::* database specific classes entirely.

I propose that we make LXR::Index a proper superclass for the DB-specific subclasses, and we push up as much functionality as possible into the superclass. The subclasses should be pretty small: they will deal only with DB-specific issues (for example, auto-incremented fields which work differently in PostgreSQL and MySQL).


  • AdrianIssott

    AdrianIssott - 2009-04-13

    I'd like to take this on as I'd also noticed a lot of redundancy in the LXR::Index modules. Malcolm can you assign it to me?

  • Malcolm Box

    Malcolm Box - 2009-04-17
    • assigned_to: nobody --> adrianissott
  • Andre-Littoz

    Andre-Littoz - 2012-08-03

    This is partially done in release 1.0. The differences in SQL dialects forces to maintain different LXR::Index::* though some of them are reduced to init (to create the queries) and DESTROY.

  • Andre-Littoz

    Andre-Littoz - 2012-08-03
    • assigned_to: adrianissott --> ajlittoz
    • status: open --> pending
  • Andre-Littoz

    Andre-Littoz - 2012-09-10
    • status: pending --> closed
  • Andre-Littoz

    Andre-Littoz - 2012-09-10

    The final release 1.0 seems to have reached a satisfying state.


Log in to post a comment.