www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Current status of DB libraries in D

reply Gianluigi Rubino <gianluigi grsoft.org> writes:
Sorry to bother you as probably this question has been asked 10k
times.=C2=A0I searched a bit in the ML archives before posting my question,
I hope to no upset anyone :-)

But I currently am able to find only _outdated_ information about the
current development of a good DB layer for D.

1) I can found good libraries for SQLite3
2) There is some support for MySQL

All other database are somehow supported, but you need to use a
different API for each different DB. There is no common effort to
build an high-level API in a db-indipendent way. Actually there is
one:=C2=A0http://github.com/aaronc/ddbi

I found some information on:
http://www.wikiservice.at/d/wiki.cgi?DatabaseBindings

Before diving in, I must say that the main source of confusion is: How
to understand if a lib has been developed for D1 ? There is a quick
way to see the difference (other than reading the documentation). It
is not lazyness, but often I found only the sources and in the doc
there is no mention about the language version (I can understand it,
if it's been developed years ago, D2 was not born yet at the time of
the writing).

Any suggestion ?

Best,
Gianluigi
Oct 12 2010
next sibling parent reply "Yao G." <yao.gomez spam.gmail.com> writes:
On Tue, 12 Oct 2010 10:29:41 -0500, Gianluigi Rubino  
<gianluigi grsoft.org> wrote:

 Sorry to bother you as probably this question has been asked 10k
 times. I searched a bit in the ML archives before posting my question,
 I hope to no upset anyone :-)

 But I currently am able to find only _outdated_ information about the
 current development of a good DB layer for D.

 1) I can found good libraries for SQLite3
 2) There is some support for MySQL

 All other database are somehow supported, but you need to use a
 different API for each different DB. There is no common effort to
 build an high-level API in a db-indipendent way. Actually there is
 one: http://github.com/aaronc/ddbi

 I found some information on:
 http://www.wikiservice.at/d/wiki.cgi?DatabaseBindings
Did you checked the DDBI project? http://dsource.org/projects/ddbi I don't know if it has been updated of lately, but it's purpose was to create a common D interface among several databases.
 Before diving in, I must say that the main source of confusion is: How
 to understand if a lib has been developed for D1 ? There is a quick
 way to see the difference (other than reading the documentation). It
 is not lazyness, but often I found only the sources and in the doc
 there is no mention about the language version (I can understand it,
 if it's been developed years ago, D2 was not born yet at the time of
 the writing).
 Any suggestion ?
Look for methods or functions or variables that manipulate string characters. If the type used is string, wstring or dstring, then it's almost guaranteed that is a D2 project. Conversely, if the type used is char[], wchar[] or dchar[], and there's no usage of the former types, then it's a D2 project. Also. Check for imported modules, if you find modules from the Tango Project (tango.foo.bar, tango.baz.bar, etc), then it's a D1 project. Tango only works with D1.
 Best,
 Gianluigi
-- Yao G.
Oct 12 2010
next sibling parent reply Jonathan M Davis <jmdavisProg gmx.com> writes:
On Tuesday, October 12, 2010 11:18:10 Yao G. wrote:
Conversely, if the type used is
 char[], wchar[] or dchar[], and there's no usage of the former types, then
 it's a D2 project.
I think that you meant D1. ;) Some good suggestions on figuring out how a project is D1 or D2 though. Still, last time I looked at dsource, most were D1, so odds are that a project is D2. Other suggestions would be to look for Phobos libraries that don't exist in D1 like std.algorithm and std.range. If they use const or immutable, then they're D2. Unfortunately, I've never really used D1, so I'm not very familiar with the differences between D1 and D2. Another thing to remember is that even if a project is D2, it could be for an older version of D2, so it may not be useable without some updating. There are some solid D2 projects out there though (like dcollections). - Jonathan M Davis
Oct 12 2010
next sibling parent reply "Yao G." <yao.gomez spam.gmail.com> writes:
 I think that you meant D1. ;)
Yes. Sorry for the confusion. The guy ask a question and I give a misdirection :( -- Yao G.
Oct 12 2010
next sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Tuesday 12 October 2010 12:09:27 Yao G. wrote:
 I think that you meant D1. ;)
Yes. Sorry for the confusion. The guy ask a question and I give a misdirection :(
Well, I think that it was fairly clear what you meant from the context. We all mistype things from time to time. - Jonathan M Davis
Oct 12 2010
prev sibling parent Gianluigi Rubino <gianluigi grsoft.org> writes:
Il giorno 12/ott/2010, alle ore 21:09, "Yao G." <yao.gomez spam.gmail.com> h=
a scritto:

 I think that you meant D1. ;)
=20 Yes. Sorry for the confusion. The guy ask a question and I give a misdirec=
tion :( No problem, I caught the swap So basically there's no wide libs availability for D2, and the best pratical= suggestions are to look for tango imports and look if the project page ment= ions D2.=20 Thanks You all guys, going back to' study TDPL. GR=
Oct 12 2010
prev sibling parent reply "Nick Sabalausky" <a a.a> writes:
"Jonathan M Davis" <jmdavisProg gmx.com> wrote in message 
news:mailman.547.1286908762.858.digitalmars-d puremagic.com...
 If they use const or immutable, then they're D2.
D1 has 'const', it just works different.
Oct 13 2010
parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Wednesday, October 13, 2010 12:56:40 Nick Sabalausky wrote:
 "Jonathan M Davis" <jmdavisProg gmx.com> wrote in message
 news:mailman.547.1286908762.858.digitalmars-d puremagic.com...
 
 If they use const or immutable, then they're D2.
D1 has 'const', it just works different.
Okay. Just goes to show that I'm not familiar with D1. :) - Jonathan M Davis
Oct 13 2010
prev sibling parent "Yao G." <yao.gomez spam.gmail.com> writes:
 Look for methods or functions or variables that manipulate string  
 characters. If the type used is string, wstring or dstring, then it's  
 almost guaranteed that is a D2 project. Conversely, if the type used is  
 char[], wchar[] or dchar[], and there's no usage of the former types,  
 then it's a D2 project.

 Also. Check for imported modules, if you find modules from the Tango  
 Project (tango.foo.bar, tango.baz.bar, etc), then it's a D1 project.  
 Tango only works with D1.
I'm an idiot. Swap D1 for D2 in the above paragraph. Must. Not. Be. Hungry. When. Posting. -- Yao G.
Oct 12 2010
prev sibling parent reply Jesse Phillips <jessekphillips+D gmail.com> writes:
The reason you are having a hard time finding the latest information on DB
Libraries is because you have already found it. There have been some discussion
on Phobos possible having SQLite, and a Standard DB interface, but as of now
there is only the older projects.

My tip for knowing what language version a library works for is actually found
on Wiki4d[1], but all it is is: does it mention support for D2? If it does not
you are looking at a D1 project. You will have to look at example code or the
library to decide if it is Tango or Phobos from there.

1. http://www.prowiki.org/wiki4d/wiki.cgi?DevelopmentWithD
Oct 12 2010
parent reply "Gour D." <gour atmarama.net> writes:
On Tue, 12 Oct 2010 14:42:08 -0400
 "Jesse" =3D=3D Jesse Phillips <jessekphillips+D gmail.com> wrote:
Jesse> My tip for knowing what language version a library works for is Jesse> actually found on Wiki4d[1], but all it is is: does it mention Jesse> support for D2? If it does not you are looking at a D1 project. Jesse> You will have to look at example code or the library to decide Jesse> if it is Tango or Phobos from there. It would be nice if the wiki could be cleaned a bit...Same goes for dsource.org to clean it from dead projects and make it more easy to find out what's alive and working. Sincerely, Gour --=20 Gour | Hlapicina, Croatia | GPG key: CDBF17CA ----------------------------------------------------------------
Oct 12 2010
parent reply Jesse Phillips <jessekphillips+D gmail.com> writes:
Gour D. Wrote:

 It would be nice if the wiki could be cleaned a bit...Same goes for
 dsource.org to clean it from dead projects and make it more easy to
 find out what's alive and working.
I did actually do a big cleanup and removed a hug amount of obsolete content. My main goal was to actually apply organization to it, so outdated content still remains but only because there isn't newer information to replace it. There is definitely a need to distinguish between dead and stable projects and their associated libraries/version requirements. But I don't have the heart yet to remove projects since having some code is better then none if you want to connect to a DB. There has been some mention of an update to DSource which would give stats on activity... but it has been about a year now. Otherwise I highly suggest as you discover things about what is mentioned in Wiki4D that Adding the heading you can find on the XML library page[1]. 1. http://www.wikiservice.at/d/wiki.cgi?AllLibraries/XmlLibraries
Oct 12 2010
parent Juanjo Alvarez <fake fakeemail.com> writes:
On Tue, 12 Oct 2010 17:31:50 -0400, Jesse Phillips 
<jessekphillips+D gmail.com> wrote:
 I did actually do a big cleanup and removed a hug amount of 
obsolete content. It would also be nice to have the libraries sorted by D's version.
Oct 12 2010