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 public static string QueryServiceRequestsNoQuery
{ {
get get
@@ -1013,6 +1021,9 @@ namespace Microsoft.SqlTools.ServiceLayer
public const string QueryServiceColumnNull = "QueryServiceColumnNull"; public const string QueryServiceColumnNull = "QueryServiceColumnNull";
public const string QueryServiceCellNull = "QueryServiceCellNull";
public const string QueryServiceRequestsNoQuery = "QueryServiceRequestsNoQuery"; public const string QueryServiceRequestsNoQuery = "QueryServiceRequestsNoQuery";

View File

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

View File

@@ -101,6 +101,8 @@ QueryServiceQueryFailed(string message) = Query failed: {0}
QueryServiceColumnNull = (No column name) QueryServiceColumnNull = (No column name)
QueryServiceCellNull = NULL
QueryServiceRequestsNoQuery = The requested query does not exist QueryServiceRequestsNoQuery = The requested query does not exist
QueryServiceQueryInvalidOwnerUri = This editor is not connected to a database QueryServiceQueryInvalidOwnerUri = This editor is not connected to a database

View File

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

View File

@@ -198,7 +198,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage
if (isNullFunc == null ? length.ValueLength == 0 : isNullFunc(length.TotalLength)) if (isNullFunc == null ? length.ValueLength == 0 : isNullFunc(length.TotalLength))
{ {
result.RawObject = null; result.RawObject = null;
result.DisplayValue = null; result.DisplayValue = SR.QueryServiceCellNull;
result.IsNull = true; result.IsNull = true;
} }
else else