www.digitalmars.com         C & C++   DMDScript  

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

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