mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-16 01:25:41 -05:00
Added missing properties for databases and server (#373)
* added get database info to admin service * refactored code to be inline with standard * added comments to utils functions * added comments to public classes * added machine name to serverinfo from connection; added last backupdate and last log backup date to database info * removed camelcase from request type * removed the wrapper for the generic dictionary * removed unnecessary imports * merged master * changed datetime compare to equality operator * added database compatability level to info * renamed field * fixed CompatibilityLevel string typo, added bakcup dates to capabilities list
This commit is contained in:
@@ -688,6 +688,8 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||
}
|
||||
|
||||
public string OsVersion;
|
||||
|
||||
public string MachineName;
|
||||
}
|
||||
|
||||
public static bool TryGetServerVersion(string connectionString, out ServerInfo serverInfo)
|
||||
@@ -751,11 +753,12 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||
serverInfo.ServerVersion = reader[1].ToString();
|
||||
serverInfo.ServerLevel = reader[2].ToString();
|
||||
serverInfo.ServerEdition = reader[3].ToString();
|
||||
serverInfo.MachineName = reader[4].ToString();
|
||||
|
||||
if (reader.FieldCount > 4)
|
||||
if (reader.FieldCount > 5)
|
||||
{
|
||||
// Detect the presence of SXI
|
||||
serverInfo.IsSelectiveXmlIndexMetadataPresent = reader.GetInt32(4) == 1;
|
||||
serverInfo.IsSelectiveXmlIndexMetadataPresent = reader.GetInt32(5) == 1;
|
||||
}
|
||||
|
||||
// The 'ProductVersion' server property is of the form ##.#[#].####.#,
|
||||
|
||||
Reference in New Issue
Block a user