Topic: FA with PostgreSQL or Oracle?

Greets,

Are the DB calls in the PHP hard-coded for MySQL, or is an abstraction layer used so alternative databases (such as PostgreSQL or Oracle) can be used?

Thanks
Henry

Re: FA with PostgreSQL or Oracle?

The database functions for MySQL is wrapped in the files /includes/db/connect_db.inc and /includes/db/sql_functions.inc (transactions), so there should be no hard-coded mysql-functions.
But we cannot guarantee that all SQL sentenses will work in either PostgreSQL or Oracle. And we do not maintain any support on this topic.

/Joe

Re: FA with PostgreSQL or Oracle?

joe wrote:

The database functions for MySQL is wrapped in the files /includes/db/connect_db.inc and /includes/db/sql_functions.inc (transactions), so there should be no hard-coded mysql-functions.
But we cannot guarantee that all SQL sentenses will work in either PostgreSQL or Oracle. And we do not maintain any support on this topic.

/Joe

Thanks, Joe.  We'll check it out and possibly contribute our Pg changes.

Re: FA with PostgreSQL or Oracle?

MySQL functions seem to be in all sorts of places, as a seach for "mysql_" reveals.

I'd like to use SQLite. I'd write the abstration layer which would be quite simple were it not for the above.

Re: FA with PostgreSQL or Oracle?

No, you are wrong. Look int the code and you will find that beside connect_db.inc there is only  a couple of single mysql_* calls in other files, and there are rationale why they are there.

You can start your abstraction layer exercise by fixing current_user.inc, db_pager.inc, system_tests.inc and install/index.php to make them use the functions defined in connect_db.inc wink.

Janusz