mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-30 09:35:39 -05:00
Clean up docs for connect and ConnectionResult (#19509)
* Clean up docs for connect and ConnectionResult * links * fix build * fix
This commit is contained in:
30
src/sql/azdata.d.ts
vendored
30
src/sql/azdata.d.ts
vendored
@@ -190,8 +190,10 @@ declare module 'azdata' {
|
||||
connectionCompletionOptions?: IConnectionCompletionOptions): Thenable<Connection>;
|
||||
|
||||
/**
|
||||
* Opens the connection and add it to object explorer and opens the dashboard and returns the ConnectionResult
|
||||
* @param connectionProfile connection profile
|
||||
* Attempts to open a new connection with the options from the given connection profile.
|
||||
* @param connectionProfile The {@link IConnectionProfile} containing the information for the connection
|
||||
* @param saveConnection Whether to save the connection in the saved connections list of the Servers view. Default is true
|
||||
* @param showDashboard Whether to show the dashboard for the connection upon success. Default is true
|
||||
*/
|
||||
export function connect(connectionProfile: IConnectionProfile, saveConnection?: boolean, showDashboard?: boolean): Thenable<ConnectionResult>;
|
||||
|
||||
@@ -5242,10 +5244,28 @@ declare module 'azdata' {
|
||||
}
|
||||
|
||||
export interface ConnectionResult {
|
||||
/**
|
||||
* Whether the connection was successful
|
||||
*/
|
||||
connected: boolean;
|
||||
connectionId: string;
|
||||
errorMessage: string;
|
||||
errorCode: number;
|
||||
/**
|
||||
* The ID of the connection if it was successful. {@link connection.getUriForConnection} can be used to get
|
||||
* the URI for this connection used by many of the other Extension API functions.
|
||||
*/
|
||||
connectionId?: string | undefined;
|
||||
/**
|
||||
* The error message if the connection was unsuccessful
|
||||
*
|
||||
* e.g. Login failed for user '<user>'.
|
||||
*/
|
||||
errorMessage?: string | undefined;
|
||||
/**
|
||||
* The error code number associated with the error if the connection was unsuccessful.
|
||||
*
|
||||
* e.g. 18456
|
||||
* (https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver-18456-database-engine-error)
|
||||
*/
|
||||
errorCode?: number | undefined;
|
||||
}
|
||||
|
||||
export namespace nb {
|
||||
|
||||
Reference in New Issue
Block a user