fix find object dialog type display name issue (#23232)

This commit is contained in:
Alan Ren
2023-05-26 07:59:34 -07:00
committed by GitHub
parent 2717a9b16d
commit 1a1839ab09
4 changed files with 39 additions and 20 deletions

View File

@@ -5,6 +5,7 @@
import * as nls from 'vscode-nls';
import { ObjectManagement } from 'mssql';
import { ObjectTypeInfo } from './ui/findObjectDialog';
const localize = nls.loadMessageBundle();
// Object Types
@@ -273,3 +274,12 @@ export function getUserTypeByDisplayName(displayName: string): ObjectManagement.
}
throw new Error(`Unknown user type display name: ${displayName}`);
}
export function getObjectTypeInfo(typeNames: string[]): ObjectTypeInfo[] {
return typeNames.map(typeName => {
return {
name: typeName,
displayName: getNodeTypeDisplayName(typeName, true)
};
});
}