From 6338acc4390abcdb8b16c28689ba0a4808dfed39 Mon Sep 17 00:00:00 2001 From: vabenil Date: Mon, 24 Oct 2022 17:50:32 +0300 Subject: [PATCH] Add toString for Nullable --- database_generation.d | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/database_generation.d b/database_generation.d index 1f8be3f..50ed1ba 100644 --- a/database_generation.d +++ b/database_generation.d @@ -50,6 +50,17 @@ struct Nullable(T) { } T toArsdJsvar() { return value; } + + string toString() { + import std.conv; + + if (isNull) { + return "Nullable.null"; + } + else { + return to!string(this.value); + } + } } struct Timestamp {