Skip to content

Commit

Permalink
Merge pull request #120 from tchaloupka/nullable_arrays
Browse files Browse the repository at this point in the history
add support for nullable arrays
  • Loading branch information
denizzzka authored Oct 29, 2018
2 parents 4750883 + f4f132e commit 2eb5e29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/dpq2/conv/native_tests.d
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public void _integration_test( string connParam ) @system
immutable Value v = answer[0][0];
static if (isArrayType!T || (is(T==Nullable!R, R) && isArrayType!R))
auto result = v.as!Bson.deserializeBson!T; //HACK: There is no direct way to read back the array values using as!.. yet
else auto result = v.as!T;
else
auto result = v.as!T;

static if(isArrayType!T)
const bool assertResult = compareArrays(result, nativeValue);
Expand Down
2 changes: 1 addition & 1 deletion src/dpq2/oids.d
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ private OidType detectOidTypeNotCareAboutNullable(T)()
static if(is(UT == VibeJson)){ return Json; } else
static if(is(UT == StdUUID)){ return UUID; } else

static assert(false, "Unsupported D type: "~UT.stringof);
static assert(false, "Unsupported D type: "~T.stringof);
}
}

Expand Down

0 comments on commit 2eb5e29

Please sign in to comment.