Jump to page: 1 2
Thread overview
Current status of DB libraries in D
Oct 12, 2010
Gianluigi Rubino
Oct 12, 2010
Yao G.
Oct 12, 2010
Jonathan M Davis
Oct 12, 2010
Yao G.
Oct 12, 2010
Jonathan M Davis
Oct 12, 2010
Gianluigi Rubino
Oct 13, 2010
Nick Sabalausky
Oct 13, 2010
Jonathan M Davis
Oct 12, 2010
Yao G.
Oct 12, 2010
Jesse Phillips
Oct 12, 2010
Gour D.
Oct 12, 2010
Jesse Phillips
Oct 12, 2010
Juanjo Alvarez
October 12, 2010
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

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
October 12, 2010
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.
October 12, 2010
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
October 12, 2010
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
October 12, 2010
> 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.
October 12, 2010
> I think that you meant D1. ;)

Yes. Sorry for the confusion. The guy ask a question and I give a misdirection :(

-- 
Yao G.
October 12, 2010
On Tue, 12 Oct 2010 14:42:08 -0400
>>>>>> "Jesse" == 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

-- 

Gour  | Hlapicina, Croatia  | GPG key: CDBF17CA
----------------------------------------------------------------


October 12, 2010
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
October 12, 2010
Il giorno 12/ott/2010, alle ore 21:09, "Yao G." <yao.gomez@spam.gmail.com> ha scritto:

>> I think that you meant D1. ;)
> 
> Yes. Sorry for the confusion. The guy ask a question and I give a misdirection :(

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 mentions  D2.

Thanks You all guys, going back to' study TDPL.

GR
October 12, 2010
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
« First   ‹ Prev
1 2