Ticket #119 (closed enhancement: fixed)

Opened 21 months ago

Last modified 16 months ago

SQLite DB support

Reported by: fboender Owned by: michiel
Priority: low Milestone:
Component: public_api Version:
Severity: Keywords: database db support sqlite backend
Cc:

Description

Suport for the SQLite DB.

Change History

  Changed 21 months ago by fboender

It might be a good idea to move to MDB2 (http://pear.php.net/package/MDB2) which provides a generic DB interface for lots of common databases, including MySQL, PostgreSQL and SQLite. All that's needed to switch to a different database is that your queries are ANSI-SQL compatible.

  Changed 21 months ago by michiel

The sql queries are ANSI-SQL compatible. It was needed for the PEAR::DB and Mysql/PostgreSQL stuff.

MDB2 is a good idea, specially because DB is no longer developed.

  Changed 21 months ago by fboender

  • type changed from defect to enhancement

  Changed 21 months ago by fboender

Related to #114

  Changed 21 months ago by fboender

  • owner changed from michiel to fboender
  • status changed from new to assigned

I'm taking up this ticket. I'll need some help on the PostgreSQL testing though.

follow-up: ↓ 7   Changed 19 months ago by michiel

Any work done on this one already ? If not, I can take this ticket from you and do some work on it today and tomorrow

in reply to: ↑ 6   Changed 19 months ago by fboender

  • owner changed from fboender to michiel
  • status changed from assigned to new

Replying to michiel:

Any work done on this one already ? If not, I can take this ticket from you and do some work on it today and tomorrow

Nope, nothing done yet, and I won't have the time to work on it for at least the coming week, unfortunately. I'll put the ticket on your name.

  Changed 19 months ago by michiel

(In [454]) switch from PEAR::DB to PEAR::MDB2 This is the first round of work. Everything is working now. We need to replace several calls of $db->query with ->execute and also lots of code to sanitize data should be replaced with the MDB2 methods for this.

Make sure you have the PEAR::MDB2 package and the correct MDB2_Driver_* for your database backend.

for mysql users: pear install MDB2 MDB2_Driver_mysql

for pgsql users: pear install MDB2 MDB2_Driver_pgsql

Re #119

  Changed 19 months ago by michiel

(In [460]) pear::mdb2 update Re #119

  Changed 19 months ago by michiel

(In [463]) all data manipulating queries now get run with ->exec() instead of ->query() Fix some more errors in php dev mode

Re #119 and #125

  Changed 19 months ago by michiel

Everything is in place for it. Mysql and Postgresql are tested and running in production.

Let me know how it works with the other backends. Keeping this open for feedback.

  Changed 19 months ago by fboender

I'll try it as soon as possible. It'll require the creation of a sqlite.sql first. I'll work on that somewhere this week.

  Changed 18 months ago by michiel

(In [480]) add sqlite schema and support. Re #119

  Changed 16 months ago by michiel

  • status changed from new to closed
  • resolution set to fixed

done.

Note: See TracTickets for help on using tickets.