Re: Call for an API standard for SQL statements

From: Fredrik Bertilsson <fredrik_bertilsson_at_passagen.se>
Date: 22 Oct 2004 22:29:43 -0700
Message-ID: <31f7e57d.0410222129.dc024a7_at_posting.google.com>


alfredo_at_ncs.es (Alfredo Novoa) wrote:
> >One feature I use is that I want custom datatypes. Lets say I have a
> >table column for telephone numers. In the database it is just a
> >VARCHAR, but in my application I handle this value as an instance of
> >the class TelephoneNo. Immediately after reading my framework converts
> >the string to an instance of TelephoneNo. To be able to do this I have
> >associated this column with the class TelephoneNo in a configuration
> >object.
>
> You can do the same with a text parser associating the class with an
> SQL "domain".
What text parser are you talking about. Please explain.

> >A second extremly useful feature is converting a two-dimensional query
> >result into a hierachical view. Lets say that we have a query joinin
> >the tables "Order" and "OrderDetail". My framework returns a list of
> >"Order" records, but calling the method "getRelatedRecords" on such
> >instance, will return a list of "OrderDetail" records. This feature is
> >only possible if the framework has knowledge about wich tables are
> >participating in the query.
>
> You only need to know which are the "master" and "detail" columns.
I don't follow you here. And still you need to now the columns.

> >A third example is data-aware GUI components. Lets say we want to make
> >a search panel which takes a query object, builds a GUI and let the
> >user fill in the parameters. This is of course only possible if we
> >have have a query object.
>
> We can do the same parsing an SQL text statement.
Indeed, but you using strings will give use the syntax checking problem.

Fredrik Bertilsson
http://butler.sourceforge.net Received on Sat Oct 23 2004 - 07:29:43 CEST

Original text of this message