Could anybody provide any simple examples of usage DerelictPQ. I
do not have experience of C, and I can't understand how to use
this driver.
I need just basics like connect, select and insert.
http://code.dlang.org/packages/derelict-pq
thanks!
On Wednesday, 24 December 2014 at 11:56:40 UTC, Suliman wrote:
Could anybody provide any simple examples of usage DerelictPQ.
I do not have experience of C, and I can't understand how to
use this driver.
I need just basics like connect, select and insert.
http://code.dlang.org/packages/dereli
I have done next:
string connString = "psql -h localhost -p 5432 -U postgres -d
testdb";
package PGconn* conn;
@property bool nonBlocking(){ return PQisnonblocking(conn) == 1;
}
this(parseConfig parseconfig)
{
void connect()
{
I haven't used the derelict version but I have used the C library
itself and wrapped it briefly in my postgres.d here:
https://github.com/adamdruppe/arsd/blob/master/postgres.d
(implements an interface from database.d in the same repo)
I used very, very little of the library, but it is enoug
On Wednesday, 24 December 2014 at 14:08:53 UTC, Adam D. Ruppe
wrote:
I haven't used the derelict version but I have used the C
library itself and wrapped it briefly in my postgres.d here:
https://github.com/adamdruppe/arsd/blob/master/postgres.d
Thanks! But few questions:
1. how to build it w
On Wednesday, 24 December 2014 at 19:26:11 UTC, Suliman wrote:
1. how to build it with dub?
I don't know, I don't use dub.
2. I tried to: dmd app.d database.d postgres.d but get message
that "File Not Found pq.lib"
Download the lib file from me here:
http://arsdnet.net/dcode/pq.lib
You'l
On 12/24/2014 8:56 PM, Suliman wrote:
Could anybody provide any simple examples of usage DerelictPQ. I do not
have experience of C, and I can't understand how to use this driver.
I need just basics like connect, select and insert.
http://code.dlang.org/packages/derelict-pq
thanks!
DerelictPQ
On 12/25/2014 11:23 AM, Mike Parker wrote:
On 12/24/2014 8:56 PM, Suliman wrote:
Could anybody provide any simple examples of usage DerelictPQ. I do not
have experience of C, and I can't understand how to use this driver.
I need just basics like connect, select and insert.
http://code.dlang.or
DerelictPQ is only a binding to libpq. The only difference is
the
DerelictPQ.load method. Just follow the libpq documentation.
http://www.postgresql.org/docs/9.1/static/libpq.html
Actually, Derelict binds to version 9.3, so the proper link
should be
http://www.postgresql.org/docs/9.3/static
On 12/25/2014 3:03 PM, Suliman wrote:
DerelictPQ is only a binding to libpq. The only difference is the
DerelictPQ.load method. Just follow the libpq documentation.
http://www.postgresql.org/docs/9.1/static/libpq.html
Actually, Derelict binds to version 9.3, so the proper link should be
http:
Adam, I trying to build simple app:
import std.stdio;
import postgres;
import database;
void main() {
auto db = new PostgreSql("dbname = test2");
foreach(line; db.query("SELECT * FROM customer")) {
writeln(line[0], line["customer_id"]);
}
}
and getting n
On Sunday, 28 December 2014 at 08:41:15 UTC, Suliman wrote:
import postgres;
import database;
Those should include the package name:
import arsd.postgres;
Since it publicly imports the base clas, you don't need to import
database yourself. (You do still need to pass all files to dmd
though,
12 matches
Mail list logo