From 5c7dae40e6a05ab132d886f2d9a671cb596b48ef Mon Sep 17 00:00:00 2001
From: Sai Avishkar Sreerama <74571829+ssreerama@users.noreply.github.com>
Date: Wed, 21 Jun 2023 19:41:18 -0500
Subject: [PATCH] Enabling database properties general tab with real time
values from SMO (#2093)
* initial commit with all required db handler and props, also getting the data from ADS
* database properties view updated
* Delete Microsoft.SqlTools.ServiceLayer.sln
This file should be ignored
* Removed unwanted file
* Using DatabaseHandler for properties as one handler per object
* removed unused and unnecessary changes
* minimal updates
* moving type conversion to UI side, properties with original types.
* conversion number fixed
* Adding Localized strings
* using existing objectUrn logic to get the smo object
* Adding Integration tests for database properties verification
* refactoring
* updating test
---
.../Localization/sr.cs | 11 +++++
.../Localization/sr.resx | 4 ++
.../Localization/sr.strings | 1 +
.../Localization/sr.xlf | 5 ++
.../ObjectTypes/Database/DatabaseHandler.cs | 47 ++++++++++++++-----
.../ObjectTypes/Database/DatabaseInfo.cs | 10 +++-
.../Utility/DatabaseUtils.cs | 10 ++++
.../ObjectManagement/DatabaseHandlerTests.cs | 44 +++++++++++++++++
.../ObjectManagementTestUtils.cs | 24 +++++++++-
9 files changed, 141 insertions(+), 15 deletions(-)
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs
index 5e06e131..d93f16b7 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs
@@ -12429,6 +12429,14 @@ namespace Microsoft.SqlTools.ServiceLayer
}
}
+ public static string databaseBackupDate_None
+ {
+ get
+ {
+ return Keys.GetString(Keys.databaseBackupDate_None);
+ }
+ }
+
public static string BasicAzureEdition
{
get
@@ -17847,6 +17855,9 @@ namespace Microsoft.SqlTools.ServiceLayer
public const string prototype_file_noApplicableFileGroup = "prototype_file_noApplicableFileGroup";
+ public const string databaseBackupDate_None = "databaseBackupDate_None";
+
+
public const string BasicAzureEdition = "BasicAzureEdition";
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx
index 3d3f4621..eae3dac2 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx
+++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx
@@ -6756,6 +6756,10 @@ The Query Processor estimates that implementing the following index could improv
No Applicable Filegroup
+
+ None
+
+
Basic
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings
index 54a20b8b..2883e583 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings
+++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings
@@ -2800,6 +2800,7 @@ general_containmentType_None = None
general_containmentType_Partial = Partial
filegroups_filestreamFiles = FILESTREAM Files
prototype_file_noApplicableFileGroup = No Applicable Filegroup
+databaseBackupDate_None = None
############################################################################
# Azure SQL DB
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf
index ca8843d0..5060a6fa 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf
+++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf
@@ -8316,6 +8316,11 @@ The Query Processor estimates that implementing the following index could improv
Hyperscale
+
+ None
+ None
+
+