Re: [PDO] PDO Cassandra

[email protected] (Wez Furlong) Thu, 25 Feb 2010 15:18:14 -0500
Newsgroups php.pdo
Message-ID <[email protected]>
On Feb 25, 2010, at 2:45 PM, Christopher Jones wrote:

> Pablo Sánchez wrote:
> > 2010/2/25 till <[email protected]>:
> >> 2010/2/25 Pablo Sánchez <[email protected]>:
> >> Cassandra is not SQL.
> >
> > Yep, I know. But it's a Database. As far as I know (please, I have
> > just get in this list, so forgive me if I say something too stupid)
>
> The question was fine.
>
> I'm not sure the Cassandra model fits well with PDOs generally
> portability aims, but since PDO drivers can have custom methods it
> would probably be possible to implement a PDO driver for it.


You'd probably want to bypass the default placeholder/parameter  
handling code.
There's no moral or design decision in PDO that prevents non-SQL data  
sources from being used.

At Message Systems, we have a C version of something very similar to  
PDO that talks to tabular, textual and LDAP data sources (even with  
multiple values for a given column).

So long as the interface is based around a query string and a response  
that can be mapped as a set of rows and columns that map back to PHP  
without too much mental or data wrangling, I don't see a problem with  
this.

You may want to look at PDO_User as a way to mock up the driver  
without writing C code.

--Wez.