From d2fd8f8f41f832da635842f9ce4a7f962da6773f Mon Sep 17 00:00:00 2001 From: Benjamin Russell Date: Thu, 23 Mar 2017 11:50:41 -0700 Subject: [PATCH] Ensuring DisplayValue is set to a value when null (#292) * Ensuring DisplayValue is set to a value when null * Changes that *actually do something!* * Changes that *actually do something!* --- .../Localization/sr.cs | 11 +++++++++++ .../Localization/sr.resx | 4 ++++ .../Localization/sr.strings | 2 ++ .../Localization/sr.xlf | 5 +++++ .../DataStorage/ServiceBufferFileStreamReader.cs | 2 +- 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs index a7c6883c..e4309317 100755 --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs @@ -205,6 +205,14 @@ namespace Microsoft.SqlTools.ServiceLayer } } + public static string QueryServiceCellNull + { + get + { + return Keys.GetString(Keys.QueryServiceCellNull); + } + } + public static string QueryServiceRequestsNoQuery { get @@ -1013,6 +1021,9 @@ namespace Microsoft.SqlTools.ServiceLayer public const string QueryServiceColumnNull = "QueryServiceColumnNull"; + public const string QueryServiceCellNull = "QueryServiceCellNull"; + + public const string QueryServiceRequestsNoQuery = "QueryServiceRequestsNoQuery"; diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx index d52e5e9b..6bff9366 100755 --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx @@ -245,6 +245,10 @@ (No column name) + + NULL + + The requested query does not exist diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings index da300ed4..75d12740 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings @@ -101,6 +101,8 @@ QueryServiceQueryFailed(string message) = Query failed: {0} QueryServiceColumnNull = (No column name) +QueryServiceCellNull = NULL + QueryServiceRequestsNoQuery = The requested query does not exist QueryServiceQueryInvalidOwnerUri = This editor is not connected to a database diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf index 2922cecb..dcae3a26 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf @@ -596,6 +596,11 @@ Result limit cannot be negative + + NULL + NULL + + \ No newline at end of file diff --git a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/ServiceBufferFileStreamReader.cs b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/ServiceBufferFileStreamReader.cs index 5060e1fe..0b5275c3 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/ServiceBufferFileStreamReader.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/ServiceBufferFileStreamReader.cs @@ -198,7 +198,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage if (isNullFunc == null ? length.ValueLength == 0 : isNullFunc(length.TotalLength)) { result.RawObject = null; - result.DisplayValue = null; + result.DisplayValue = SR.QueryServiceCellNull; result.IsNull = true; } else