D Database Connectivity
Mandeep
mandeep at brars.co.in
Tue May 24 03:53:11 PDT 2011
On 05/24/2011 10:08 AM, Sean Kelly wrote:
> On May 22, 2011, at 11:49 PM, Mandeep Singh Brar wrote:
>
>> I have tried to port the jdbc drivers of postgres and sqlite along
>> with libodbcxx to D2/phobos. The library ddbc, having an API similar
>> to JDBC has been uploaded to dsource.org/projects/ddbc. Though
>> everything from JDBC (blobs etc) may not be working (or atleast have
>> not been tested), simple things like statements, callable statements
>> and prepared statements seem to be working and have been put in a
>> sample program on the home page.
>
> Nice work! I'd like to see the API become a bit more D-like though. For example, with overloading and the index operator, prepared statement parameters could be set like:
>
> st[0] = "hello world";
>
> Similar with ResultSet for indexing, along with possibly an alternate way to specify the desired type:
>
> rs[0].to!string();
> rs[0].asString;
> rs["stringType"].to!string();
>
> For licensing, have you considered the Boost license?
Anything is ok with me for licensing. But i am not sure how it works in
case i am porting code from another language. The ported classes are
LGPL, so i thought LGPL would be the way to go. I am not sure of what
all i need to do to put up a license though. Was thinking of putting up
information on the site page.
I had thought about your suggestion earlier of overloading operators and
making it more d like, but did not go that way because i am not
comfortable with those functionalities and would have to read a bit to
do that. Anyone who understands that is more than welcome to do that if
people feel it adds more value.
But my priority was to get more drivers up and running.
Thanks
Mandeep
More information about the Digitalmars-d-announce
mailing list