Object/relational mappers for PHP?

Object/relational mappers for PHP?

am 21.04.2006 16:49:44 von Mitch Pirtle

Hi gang,

We finally have the underpinnings for database drivers in Joomla 1.5,
and now are tackling the thorny issue of all those MySQL-specific SQL
statements littering the core.

One solution of course is to use Christopher Kings-Lynne's(sp?) MySQL
compatibility goodies, but we are also looking to solve this riddle at
the application layer so we can support more databases in the future.

We have implemented some basic SQL generating methods in our database
class (to manage LIMIT and LEFT JOIN differences, for example) but are
primarily relying on ANSI SQL to get around most issues.

I'd like to know if anyone here is already working on a class to
generate SQL at the object level, as opposed to (re)inventing your own
API to generate queries for each database engine.

Anybody else working on something?

--
Mitch Pirtle
Joomla! Core Developer
Open Source Matters

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Re: Object/relational mappers for PHP?

am 21.04.2006 17:46:11 von Joshua Drake

Mitch Pirtle wrote:
> Hi gang,
>
> We finally have the underpinnings for database drivers in Joomla 1.5,
> and now are tackling the thorny issue of all those MySQL-specific SQL
> statements littering the core.

This might help:


http://wiki.cc/php/Object_Relational_Mapping


Joshua D. Drake

>
> One solution of course is to use Christopher Kings-Lynne's(sp?) MySQL
> compatibility goodies, but we are also looking to solve this riddle at
> the application layer so we can support more databases in the future.
>
> We have implemented some basic SQL generating methods in our database
> class (to manage LIMIT and LEFT JOIN differences, for example) but are
> primarily relying on ANSI SQL to get around most issues.
>
> I'd like to know if anyone here is already working on a class to
> generate SQL at the object level, as opposed to (re)inventing your own
> API to generate queries for each database engine.
>
> Anybody else working on something?
>
> --
> Mitch Pirtle
> Joomla! Core Developer
> Open Source Matters
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>


--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/



---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Re: Object/relational mappers for PHP?

am 22.04.2006 06:17:41 von Manuel Lemos

Hello,

on 04/21/2006 11:49 AM Mitch Pirtle said the following:
> Hi gang,
>
> We finally have the underpinnings for database drivers in Joomla 1.5,
> and now are tackling the thorny issue of all those MySQL-specific SQL
> statements littering the core.
>
> One solution of course is to use Christopher Kings-Lynne's(sp?) MySQL
> compatibility goodies, but we are also looking to solve this riddle at
> the application layer so we can support more databases in the future.
>
> We have implemented some basic SQL generating methods in our database
> class (to manage LIMIT and LEFT JOIN differences, for example) but are
> primarily relying on ANSI SQL to get around most issues.
>
> I'd like to know if anyone here is already working on a class to
> generate SQL at the object level, as opposed to (re)inventing your own
> API to generate queries for each database engine.
>
> Anybody else working on something?

You may want to take a look at Metastorage. It is a code generation tool
that generates Object-Relational mapping classes. It generates self
contained code that does not need any runtime persistence framework.

The generated code uses Metabase API to provide total database
independence, not only at the database access level, but also at the
database schema installation level. Among many other aspects it
abstracts result row range SELECT (LIMIT clause), auto-incremented key
access, etc.. It supports PostgreSQL among many other databases.

You may find more information about Metastorage and Metabase here:

http://www.metastorage.net/

http://www.phpclasses.org/metabase


--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Re: Object/relational mappers for PHP?

am 27.04.2006 02:20:40 von Marc McIntyre

Propel is a PHP 5 ORM, based on Apache Torque.

http://propel.tigris.org/

Mitch Pirtle wrote:

>Hi gang,
>
>We finally have the underpinnings for database drivers in Joomla 1.5,
>and now are tackling the thorny issue of all those MySQL-specific SQL
>statements littering the core.
>
>One solution of course is to use Christopher Kings-Lynne's(sp?) MySQL
>compatibility goodies, but we are also looking to solve this riddle at
>the application layer so we can support more databases in the future.
>
>We have implemented some basic SQL generating methods in our database
>class (to manage LIMIT and LEFT JOIN differences, for example) but are
>primarily relying on ANSI SQL to get around most issues.
>
>I'd like to know if anyone here is already working on a class to
>generate SQL at the object level, as opposed to (re)inventing your own
>API to generate queries for each database engine.
>
>Anybody else working on something?
>
>--
>Mitch Pirtle
>Joomla! Core Developer
>Open Source Matters
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: explain analyze is your friend
>
>
>

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster