|
@@ -132,7 +132,7 @@ void hello(HTTPServerRequest req, HTTPServerResponse res){
|
|
|
|
|
|
|
|
|
/*
|
|
|
-void test_pg_conn_driver(){
|
|
|
+void test_pg_conn_driver(){ // https://github.com/denizzzka/vibe.d.db.postgresql/blob/master/example/example.d#L13
|
|
|
client.pickConnection( (scope conn){
|
|
|
immutable result = conn.execStatement(
|
|
|
"SELECT 123 as first_num, 567 as second_num, 'abc'::text as third_text " ~
|
|
@@ -160,9 +160,9 @@ void test_pg_conn_driver_queries(){
|
|
|
|
|
|
client.pickConnection( (scope conn){
|
|
|
conn.prepareStatement("get_city_by_id", "SELECT id, name, population FROM test WHERE id = $1"); // get_city_by_id
|
|
|
- QueryParams params;
|
|
|
+ QueryParams params; // https://github.com/denizzzka/dpq2/blob/master/src/dpq2/args.d#L15
|
|
|
params.preparedStatementName = "get_city_by_id";
|
|
|
- params.argsVariadic(3);
|
|
|
+ params.argsVariadic(3); // https://github.com/denizzzka/dpq2/blob/master/example/example.d#L42 // https://github.com/denizzzka/dpq2/blob/master/src/dpq2/query.d#L336 // https://github.com/denizzzka/vibe.d.db.postgresql/blob/master/source/vibe/db/postgresql/package.d#L423
|
|
|
auto result1 = conn.execPreparedStatement(params);
|
|
|
|
|
|
writeln("id: ", result1[0]["id"].as!PGinteger);
|