Adding filtering support to OE (#2039)

* Init push

* Fixing filters

* Fixing more filters

* Fixing display strings

* Fixing boolean filter

* Adding comments

* Fixing function name

* Making nullables

* Separating filter parsing logic

* Adding tests

* Update src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/ObjectExplorerUtils.cs

Co-authored-by: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com>

* Update src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/ObjectExplorerUtils.cs

Co-authored-by: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com>

* Update src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/Contracts/NodeInfo.cs

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* Update src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/Contracts/NodeInfo.cs

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* Update src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/Nodes/TreeNode.cs

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* Adding comments

* Fixing whitespace

* Adding more  comments and changing to IEnumerable

* Fixing code comments

* Fixing tests adding more filters

---------

Co-authored-by: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com>
Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
Aasim Khan
2023-05-05 13:22:42 -07:00
committed by GitHub
parent 1b5f774741
commit 46e6b484a3
18 changed files with 2013 additions and 81 deletions

View File

@@ -2381,6 +2381,134 @@ namespace Microsoft.SqlTools.ServiceLayer
}
}
public static string FilterName
{
get
{
return Keys.GetString(Keys.FilterName);
}
}
public static string FilterNameDescription
{
get
{
return Keys.GetString(Keys.FilterNameDescription);
}
}
public static string FilterSchema
{
get
{
return Keys.GetString(Keys.FilterSchema);
}
}
public static string FilterSchemaDescription
{
get
{
return Keys.GetString(Keys.FilterSchemaDescription);
}
}
public static string FilterOwner
{
get
{
return Keys.GetString(Keys.FilterOwner);
}
}
public static string FilterOwnerDescription
{
get
{
return Keys.GetString(Keys.FilterOwnerDescription);
}
}
public static string FilterDurabilityType
{
get
{
return Keys.GetString(Keys.FilterDurabilityType);
}
}
public static string FilterDurabilityTypeDescription
{
get
{
return Keys.GetString(Keys.FilterDurabilityTypeDescription);
}
}
public static string FilterIsMemoryOptimized
{
get
{
return Keys.GetString(Keys.FilterIsMemoryOptimized);
}
}
public static string FilterIsMemoryOptimizedDescription
{
get
{
return Keys.GetString(Keys.FilterIsMemoryOptimizedDescription);
}
}
public static string FilterCreateDate
{
get
{
return Keys.GetString(Keys.FilterCreateDate);
}
}
public static string FilterCreateDateDescription
{
get
{
return Keys.GetString(Keys.FilterCreateDateDescription);
}
}
public static string FilterIsNativelyCompiled
{
get
{
return Keys.GetString(Keys.FilterIsNativelyCompiled);
}
}
public static string FilterIsNativelyCompiledDescription
{
get
{
return Keys.GetString(Keys.FilterIsNativelyCompiledDescription);
}
}
public static string FilterInPrimaryKey
{
get
{
return Keys.GetString(Keys.FilterInPrimaryKey);
}
}
public static string FilterInPrimaryKeyDescription
{
get
{
return Keys.GetString(Keys.FilterInPrimaryKeyDescription);
}
}
public static string ScriptingParams_ConnectionString_Property_Invalid
{
get
@@ -12045,6 +12173,54 @@ namespace Microsoft.SqlTools.ServiceLayer
public const string DatabaseNotAccessible = "DatabaseNotAccessible";
public const string FilterName = "FilterName";
public const string FilterNameDescription = "FilterNameDescription";
public const string FilterSchema = "FilterSchema";
public const string FilterSchemaDescription = "FilterSchemaDescription";
public const string FilterOwner = "FilterOwner";
public const string FilterOwnerDescription = "FilterOwnerDescription";
public const string FilterDurabilityType = "FilterDurabilityType";
public const string FilterDurabilityTypeDescription = "FilterDurabilityTypeDescription";
public const string FilterIsMemoryOptimized = "FilterIsMemoryOptimized";
public const string FilterIsMemoryOptimizedDescription = "FilterIsMemoryOptimizedDescription";
public const string FilterCreateDate = "FilterCreateDate";
public const string FilterCreateDateDescription = "FilterCreateDateDescription";
public const string FilterIsNativelyCompiled = "FilterIsNativelyCompiled";
public const string FilterIsNativelyCompiledDescription = "FilterIsNativelyCompiledDescription";
public const string FilterInPrimaryKey = "FilterInPrimaryKey";
public const string FilterInPrimaryKeyDescription = "FilterInPrimaryKeyDescription";
public const string ScriptingParams_ConnectionString_Property_Invalid = "ScriptingParams_ConnectionString_Property_Invalid";

View File

@@ -1458,6 +1458,70 @@
<value>The database {0} is not accessible.</value>
<comment></comment>
</data>
<data name="FilterName" xml:space="preserve">
<value>Name</value>
<comment></comment>
</data>
<data name="FilterNameDescription" xml:space="preserve">
<value>Include or exclude objects based on the name or part of a name.</value>
<comment></comment>
</data>
<data name="FilterSchema" xml:space="preserve">
<value>Schema</value>
<comment></comment>
</data>
<data name="FilterSchemaDescription" xml:space="preserve">
<value> Include or exclude objects based on the schema or part of a schema name.</value>
<comment></comment>
</data>
<data name="FilterOwner" xml:space="preserve">
<value>Owner</value>
<comment></comment>
</data>
<data name="FilterOwnerDescription" xml:space="preserve">
<value>Include or exclude objects based on the owner or part of an owner name.</value>
<comment></comment>
</data>
<data name="FilterDurabilityType" xml:space="preserve">
<value>Durability Type</value>
<comment></comment>
</data>
<data name="FilterDurabilityTypeDescription" xml:space="preserve">
<value>Include or exclude objects based on the durability type.</value>
<comment></comment>
</data>
<data name="FilterIsMemoryOptimized" xml:space="preserve">
<value>Is Memory Optimized</value>
<comment></comment>
</data>
<data name="FilterIsMemoryOptimizedDescription" xml:space="preserve">
<value>Include or exclude objects based on whether the object is memory optimized.</value>
<comment></comment>
</data>
<data name="FilterCreateDate" xml:space="preserve">
<value>Create Date</value>
<comment></comment>
</data>
<data name="FilterCreateDateDescription" xml:space="preserve">
<value>Select or type a creation date to include or exclude objects created at any time on that date, or enter a starting and ending date to include or exclude objects created in that inclusive date range.</value>
<comment></comment>
</data>
<data name="FilterIsNativelyCompiled" xml:space="preserve">
<value>Is Natively Compiled</value>
<comment></comment>
</data>
<data name="FilterIsNativelyCompiledDescription" xml:space="preserve">
<value>Include or exclude objects based on whether the object is natively compiled.</value>
<comment></comment>
</data>
<data name="FilterInPrimaryKey" xml:space="preserve">
<value>In Primary Key</value>
<comment></comment>
</data>
<data name="FilterInPrimaryKeyDescription" xml:space="preserve">
<value>Include or exclude objects based on whether the column is in a primary key.</value>
<comment></comment>
</data>
<data name="ScriptingParams_ConnectionString_Property_Invalid" xml:space="preserve">
<value>Error parsing ScriptingParams.ConnectionString property.</value>
<comment></comment>

View File

@@ -720,6 +720,22 @@ FileTable_LabelPart = File Table
DatabaseNotAccessible = The database {0} is not accessible.
FilterName = Name
FilterNameDescription = Include or exclude objects based on the name or part of a name.
FilterSchema = Schema
FilterSchemaDescription = Include or exclude objects based on the schema or part of a schema name.
FilterOwner = Owner
FilterOwnerDescription = Include or exclude objects based on the owner or part of an owner name.
FilterDurabilityType = Durability Type
FilterDurabilityTypeDescription = Include or exclude objects based on the durability type.
FilterIsMemoryOptimized = Is Memory Optimized
FilterIsMemoryOptimizedDescription = Include or exclude objects based on whether the object is memory optimized.
FilterCreateDate = Create Date
FilterCreateDateDescription = Select or type a creation date to include or exclude objects created at any time on that date, or enter a starting and ending date to include or exclude objects created in that inclusive date range.
FilterIsNativelyCompiled = Is Natively Compiled
FilterIsNativelyCompiledDescription = Include or exclude objects based on whether the object is natively compiled.
FilterInPrimaryKey = In Primary Key
FilterInPrimaryKeyDescription = Include or exclude objects based on whether the column is in a primary key.
############################################################################
# Scripting Service

View File

@@ -7137,6 +7137,76 @@ The Query Processor estimates that implementing the following index could improv
<target state="new">Impersonate Any Login</target>
<note></note>
</trans-unit>
<trans-unit id="FilterName">
<source>Name</source>
<target state="new">Name</target>
<note></note>
</trans-unit>
<trans-unit id="FilterNameDescription">
<source>Include or exclude objects based on the name or part of a name.</source>
<target state="new">Include or exclude objects based on the name or part of a name.</target>
<note></note>
</trans-unit>
<trans-unit id="FilterSchema">
<source>Schema</source>
<target state="new">Schema</target>
<note></note>
</trans-unit>
<trans-unit id="FilterSchemaDescription">
<source> Include or exclude objects based on the schema or part of a schema name.</source>
<target state="new"> Include or exclude objects based on the schema or part of a schema name.</target>
<note></note>
</trans-unit>
<trans-unit id="FilterOwner">
<source>Owner</source>
<target state="new">Owner</target>
<note></note>
</trans-unit>
<trans-unit id="FilterOwnerDescription">
<source>Include or exclude objects based on the owner or part of an owner name.</source>
<target state="new">Include or exclude objects based on the owner or part of an owner name.</target>
<note></note>
</trans-unit>
<trans-unit id="FilterDurabilityType">
<source>Durability Type</source>
<target state="new">Durability Type</target>
<note></note>
</trans-unit>
<trans-unit id="FilterDurabilityTypeDescription">
<source>Include or exclude objects based on the durability type.</source>
<target state="new">Include or exclude objects based on the durability type.</target>
<note></note>
</trans-unit>
<trans-unit id="FilterIsMemoryOptimized">
<source>Is Memory Optimized</source>
<target state="new">Is Memory Optimized</target>
<note></note>
</trans-unit>
<trans-unit id="FilterIsMemoryOptimizedDescription">
<source>Include or exclude objects based on whether the object is memory optimized.</source>
<target state="new">Include or exclude objects based on whether the object is memory optimized.</target>
<note></note>
</trans-unit>
<trans-unit id="FilterCreateDate">
<source>Create Date</source>
<target state="new">Create Date</target>
<note></note>
</trans-unit>
<trans-unit id="FilterCreateDateDescription">
<source>Select or type a creation date to include or exclude objects created at any time on that date, or enter a starting and ending date to include or exclude objects created in that inclusive date range.</source>
<target state="new">Select or type a creation date to include or exclude objects created at any time on that date, or enter a starting and ending date to include or exclude objects created in that inclusive date range.</target>
<note></note>
</trans-unit>
<trans-unit id="FilterIsNativelyCompiled">
<source>Is Natively Compiled</source>
<target state="new">Is Natively Compiled</target>
<note></note>
</trans-unit>
<trans-unit id="FilterIsNativelyCompiledDescription">
<source>Include or exclude objects based on whether the object is natively compiled.</source>
<target state="new">Include or exclude objects based on whether the object is natively compiled.</target>
<note></note>
</trans-unit>
<trans-unit id="ServiceProviderNotSet">
<source>SetServiceProvider() was not called to establish the required service provider</source>
<target state="new">SetServiceProvider() was not called to establish the required service provider</target>
@@ -7147,6 +7217,16 @@ The Query Processor estimates that implementing the following index could improv
<target state="new">Service {0} was not found in the service provider</target>
<note></note>
</trans-unit>
<trans-unit id="FilterInPrimaryKey">
<source>In Primary Key</source>
<target state="new">In Primary Key</target>
<note></note>
</trans-unit>
<trans-unit id="FilterInPrimaryKeyDescription">
<source>Include or exclude objects based on whether the column is in a primary key.</source>
<target state="new">Include or exclude objects based on whether the column is in a primary key.</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>