www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Anybody seen *working* postgresql client library binding?

reply mimocrocodil <4denizzz gmail.com> writes:
Or, may be, more high level library for Postgresql 9.0 ?

I am checked:

dpq
dbi
ddb

no one is not compiling by dmd 2.

It is need to start doing "dpq2" with a neat and beautiful code for working
with libpq and D2?
Aug 11 2011
next sibling parent reply Trass3r <un known.com> writes:
Maybe http://arsdnet.net/dcode/postgres.d
Aug 11 2011
parent Adam D. Ruppe <destructionator gmail.com> writes:
 Maybe http://arsdnet.net/dcode/postgres.d
note you'll need http://arsdnet.net/dcode/database.d too if you want to try that out. I've only used it for light work but it might work for you.
Aug 11 2011
prev sibling parent reply mimocrocodil <4denizzz gmail.com> writes:
Trass3r (un known.com):

 Maybe http://arsdnet.net/dcode/postgres.d
This is not pure binding, and it is not compiles with current std library without warnings and errors: std.stdarg is deprecated. You should import core.vararg instead. /usr/include/d/dmd/druntime/import/core/stdc/stdarg.di(93): Error: variable core.stdc.stdarg.va_arg!(immutable(char[])).va_arg.parmn cannot modify immutable /usr/include/d/dmd/druntime/import/core/stdc/stdarg.di(78): Error: template instance core.stdc.stdarg.va_arg!(immutable(char[])) error instantiating arsd/database.d(28): instantiated from here: va_arg!(immutable(char[])) arsd/database.d(28): Error: template instance core.stdc.stdarg.va_arg!(immutable(char[])) error instantiating I think it is need to create exact binding for libpq and separately create any other higher-level abstractions for Postgres or universal for any DB. But maybe someone has already done it? So far my searches have not yielded results.
Aug 12 2011
parent Adam D. Ruppe <destructionator gmail.com> writes:
 This is not pure binding, and it is not compiles with current std
 library without warnings and errors:
A pure binding is trivial, just make one yourself. All you have to do is copy/paste from the C header. On those errors though, I forgot to update that folderr. You can try re-downloading it now or use the github version which is a little more up to date https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff
Aug 12 2011