[development] Any solution for solving DB reserved wordconflict?
Larry Garfield
larry at garfieldtech.com
Tue Feb 19 01:57:47 UTC 2008
On Monday 18 February 2008, David Durham, Jr. wrote:
> On Feb 18, 2008 2:19 PM, David Durham, Jr. <david.durham.jr at gmail.com>
wrote:
> > On Feb 18, 2008 2:07 PM, Larry Garfield <larry at garfieldtech.com> wrote:
> > > An ORM requires a query builder. A query builder alone is not an ORM.
> > > I don't think we need/want a complete database-ORM, but a query builder
> > > is very valuable to have.
> >
> > I know what you're saying, but a single query builder doesn't seem to
> > suffice. You need one for mysql, postgres .. etc.
>
> forgot to mention that something as seemingly trivial as join tables
> can required different sql. Think someone brought up a point about
> the new version of postgres requires casts when the datatypes used to
> join are different.
First, there's only so far a database can customize its syntax before it
doesn't count as SQL anymore. :-)
Second, please have a look at the database_query_builder.inc file in the pdo
directory of my sandbox. (My CVS name is crell.) It should handle any
reasonably standard SQL database, and is fully overridable for a specific
database type using simple class inheritance. I am working on the patch to
integrate it into core, which I hope to have ready for testing by the end of
the week. At that point I welcome feedback on its compatibility with other
databases.
--
Larry Garfield AIM: LOLG42
larry at garfieldtech.com ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson
More information about the development
mailing list