SQL working [ was Re: The sorry state of the D stack? ]

Paulo Pinto pjmlp at progtools.org
Sun Oct 7 03:09:01 PDT 2012


On Sunday, 7 October 2012 at 09:56:30 UTC, Piotr Szturmaj wrote:
> Russel Winder wrote:
>> On Sun, 2012-10-07 at 00:35 +0200, denizzzka wrote:
>>> On Saturday, 6 October 2012 at 12:06:07 UTC, Thomas Koch 
>>> wrote:
>>>>> - I looked for a PostgreSQL client library. I found small
>>>> personal hacks and
>>>> dead projects.
>>>
>>> https://github.com/denizzzka/dpq2
>>>
>>> This is my personal project but it is not dead, and I am
>>> determined to see it through. At the moment, it is quite 
>>> suitable
>>> to be used in simple situations. Compiles without warnings by 
>>> dmd
>>> 2.060, also it can be used with rdmd.
>>>
>>> I really need users, comments, suggestions, bug reports and
>>> commits.
>>
>> Why only PostgreSQL. Shouldn't it also work with MySQL, 
>> Oracle, DB2,
>> PervasiveSQL, SQLite3, etc.?
>
> I wrote a PostgreSQL client too, but I also want to make MySQL 
> and SQlite clients/wrappers and release them all at once. This 
> is because I want to create uniform DB interface, and it must 
> be suited for all database systems. I started with PostgreSQL 
> because it's most complex of the three, for instance it 
> supports array and struct fields.
>

I would also look at commercial DB, otherwise you might still 
find a few surprises while defining an uniform DB.

I went through that pain back in 1999-2001, when we were defining 
an abstraction mechanism in TCL/C to bind to multiple databases, 
akin to ActiveRecord on Ruby.

For example, on those days using only ODBC was not enough for SQL 
Server 6. We also needed to make use of another binding provided 
for compatibility with Sybase SQL Server, to be able to offer all 
the same API when using SQL Server as DB. That took awhile to 
figure out how to integrate into the existing architecture.

--
Paulo



More information about the Digitalmars-d mailing list