Browse Source

upd driver version - functions renamed

221V 5 days ago
parent
commit
2d81eac47c
3 changed files with 9 additions and 10 deletions
  1. 1 1
      vtest/dub.json
  2. 3 4
      vtest/dub.selections.json
  3. 5 5
      vtest/source/app.d

+ 1 - 1
vtest/dub.json

@@ -13,7 +13,7 @@
     "vibe-inet:textfilter": "~>1.1.2",
     
     "mustache-d": "~>0.1.5",
-    "vibe-d-postgresql": "~>3.1.3"
+    "vibe-d-postgresql": "~>3.2.0-rc1"
   },
   "libs": ["pq", "ssl", "crypto", "ldap", "gssapi_krb5"],
   "lflags": [],

+ 3 - 4
vtest/dub.selections.json

@@ -3,7 +3,7 @@
 	"versions": {
 		"derelict-pq": "4.0.0",
 		"derelict-util": "3.0.0-beta.2",
-		"dpq2": "1.1.7",
+		"dpq2": "1.2.3",
 		"eventcore": "0.9.35",
 		"mir-linux-kernel": "1.2.1",
 		"money": "3.0.2",
@@ -14,10 +14,9 @@
 		"taggedalgebraic": "0.11.23",
 		"vibe-container": "1.6.2",
 		"vibe-core": "2.11.0",
-		"vibe-d": "0.10.2",
-		"vibe-d-postgresql": "3.1.3",
+		"vibe-d-postgresql": "3.2.0-rc1",
 		"vibe-inet": "1.1.2",
-		"vibe-serialization": "1.1.1",
+		"vibe-serialization": "1.0.7",
 		"vibe-stream": "1.1.1"
 	}
 }

+ 5 - 5
vtest/source/app.d

@@ -134,7 +134,7 @@ void hello(HTTPServerRequest req, HTTPServerResponse res){
 /*
 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(
+    immutable result = conn.exec(
       "SELECT 123 as first_num, 567 as second_num, 'abc'::text as third_text " ~
       "UNION ALL " ~
       "SELECT 890, 233, 'fgh'::text as third_text",
@@ -159,18 +159,18 @@ string get_all_cities(){
 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
+    conn.prepareEx("get_city_by_id", "SELECT id, name, population FROM test WHERE id = $1"); // get_city_by_id
     QueryParams params; // https://github.com/denizzzka/dpq2/blob/master/src/dpq2/args.d#L15
     params.preparedStatementName = "get_city_by_id";
     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);
+    auto result1 = conn.execPrepared(params);
     
     writeln("id: ", result1[0]["id"].as!PGinteger);
     writeln("name: ", result1[0]["name"].as!PGtext);
     writeln("population: ", result1[0]["population"].as!PGinteger);
     
-    //conn.prepareStatement("q1", "UPDATE test SET name = $1, population = $2 WHERE id = $3"); // update_city_by_id
-    //immutable result1 = conn.execPreparedStatement("", ValueFormat.BINARY);
+    //conn.prepareEx("q1", "UPDATE test SET name = $1, population = $2 WHERE id = $3"); // update_city_by_id
+    //immutable result1 = conn.execPrepared("", ValueFormat.BINARY);
     
   } );
 }