Re: Call for an API standard for SQL statements
Date: Fri, 22 Oct 2004 11:22:41 GMT
Message-ID: <4178ed70.92056687_at_news.wanadoo.es>
On 21 Oct 2004 22:22:22 -0700, fredrik_bertilsson_at_passagen.se (Fredrik Bertilsson) wrote:
>> Why wouldn't it be easier to translate back and forth between standard SQL
>> and the vendor's dialect SQL?
>It is not easier because first you need to do parsing of the standard
>SQL.
And what's the problem for a good programmer? ;-)
> After the parsing phase you will have an object structure
>representing the statemenet.
Indeed an "Abstract Syntax Tree", and this tree format does not need to be "standard".
>There are also one more important reason for creating the query as an
>object instead of a string. Using a string, you can never check the
>syntax before runtime. But using object representation, syntax errors
>will be detected during compilation.
You can use an embedded SQL pre-procesor. this is a very old idea.
Regards Received on Fri Oct 22 2004 - 13:22:41 CEST