Beispiel #1
0
 public async Task QueryFromMixedCursorOutput()
 {
     var db = new SPTestsDatabase();
     // Following the Oracle pattern this WILL dereference; so we need some more interesting result sets in there now.
     var firstItemCursorMix = await db.SingleFromProcedureAsync("cursor_mix", outParams: new { anyname = new Cursor(), othername = 0 });
     Assert.AreEqual(11, firstItemCursorMix.a);
     Assert.AreEqual(22, firstItemCursorMix.b);
 }
Beispiel #2
0
 public async Task ReadOutputParamsUsingQuery()
 {
     var db = new SPTestsDatabase();
     // Again this is Postgres specific: output params are really part of data row and can be read that way
     var record = await db.SingleFromProcedureAsync("test_vars", new { w = 2 });
     Assert.AreEqual(3, record.v);
     Assert.AreEqual(4, record.w);
     Assert.AreEqual(5, record.x);
 }