# PDO (was: SQLite API deficiency)

- Thread: https://externals.io/message/9837
- Original archive: https://news-web.php.net/php.internals/9837
- Started by Marc Boeren on 2004-05-13T14:29:50+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #9837 — Marc Boeren — 2004-05-13T14:29:50+00:00

URL: https://externals.io/message/9837#9837

Hi,

> I'm currently in DB API mode (working on PDO), 

I know PDO is slated to be _the_ db-abstraction module from 5.x (5.1?)
onwards (which would replace dbx, but that's fine by me: PDO seems to
work more or less the same but with a more OO-ish api), but I was
wondering if these names bear any relation to the Python DB-API and the
Python Database Objects, or if that is more of a coincidence?

Also, will there be an complementary SQL-abstraction package for
SQL-dialect differences (such as UPPER(value) vs. UCASE(value), or
differences in TOP/LIMIT/OFFSET usage)? 
I have a preliminary package ready (in php-source-code, not c) that is
coupled to an OO-ish api for dbx, but is easily rewritable to a more
generic version.

Cheerio, Marc.

---

## #9838 — Wez Furlong — 2004-05-13T14:46:24+00:00

URL: https://externals.io/message/9837#9838 · In reply to: #9837

It's more like Perl DBI in concept but with a PHP twist; data access
abstraction as opposed to database abstraction.

Very light weight and will take advantage of PHP 5 OO features to
implement lazy evaluation of result sets.

Although we discussed a limited amount SQL dialect abstraction at
LinuxTag last year, the initial code is not going to do anything about
it.

You'll see more on PDO over the next week, when it starts to appear in
PECL.

--Wez. 

> -----Original Message-----
> From: Marc Boeren [mailto:m.boeren@guidance.nl] 
> Sent: 13 May 2004 15:30
> To: PHP Development
> Subject: [PHP-DEV] PDO (was: SQLite API deficiency)
> 
> 
> Hi,
> 
> > […]
> 
> I know PDO is slated to be _the_ db-abstraction module from 5.x (5.1?)
> onwards (which would replace dbx, but that's fine by me: PDO seems to
> work more or less the same but with a more OO-ish api), but I was
> wondering if these names bear any relation to the Python 
> DB-API and the
> Python Database Objects, or if that is more of a coincidence?
> 
> Also, will there be an complementary SQL-abstraction package for
> SQL-dialect differences (such as UPPER(value) vs. UCASE(value), or
> differences in TOP/LIMIT/OFFSET usage)? 
> I have a preliminary package ready (in php-source-code, not c) that is
> coupled to an OO-ish api for dbx, but is easily rewritable to a more
> generic version.
> 
> Cheerio, Marc.

---

## #9842 — Lukas Smith — 2004-05-13T15:58:09+00:00

URL: https://externals.io/message/9837#9842 · In reply to: #9837

Marc Boeren wrote:

> > […]

> I know PDO is slated to be _the_ db-abstraction module from 5.x (5.1?)
> onwards (which would replace dbx, but that's fine by me: PDO seems to
> work more or less the same but with a more OO-ish api), but I was
> wondering if these names bear any relation to the Python DB-API and the
> Python Database Objects, or if that is more of a coincidence?
> 
> Also, will there be an complementary SQL-abstraction package for
> SQL-dialect differences (such as UPPER(value) vs. UCASE(value), or
> differences in TOP/LIMIT/OFFSET usage)? 
> I have a preliminary package ready (in php-source-code, not c) that is
> coupled to an OO-ish api for dbx, but is easily rewritable to a more
> generic version.

Actually PDO is more an API unification than abstraction layer. 
Abstraction will best be handled in userland code, specifically a PEAR 
package should handle this. For this reason I am also involved in the 
project more from the API perspective then from actual C implementation. 
Also obviously the current DBAL in PEAR have solved alot of the issues 
that PDO faces as well.

regards,
Lukas Smith
