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!*
This commit is contained in:
Benjamin Russell
2017-03-23 11:50:41 -07:00
committed by GitHub
parent 991421c6f8
commit d2fd8f8f41
5 changed files with 23 additions and 1 deletions

View File

@@ -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";

View File

@@ -245,6 +245,10 @@
<value>(No column name)</value>
<comment></comment>
</data>
<data name="QueryServiceCellNull" xml:space="preserve">
<value>NULL</value>
<comment></comment>
</data>
<data name="QueryServiceRequestsNoQuery" xml:space="preserve">
<value>The requested query does not exist</value>
<comment></comment>

View File

@@ -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

View File

@@ -596,6 +596,11 @@
<target state="new">Result limit cannot be negative</target>
<note></note>
</trans-unit>
<trans-unit id="QueryServiceCellNull">
<source>NULL</source>
<target state="new">NULL</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -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