Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace connection

Namespace for connection management

Index

Type aliases

ConnectionEventType

ConnectionEventType: "onConnect" | "onDisconnect" | "onConnectionChanged"

Supported connection event types

Functions

connect

  • Opens the connection and add it to object explorer and opens the dashboard and returns the ConnectionResult

    Parameters

    • connectionProfile: IConnectionProfile

      connection profile

    • Optional saveConnection: boolean
    • Optional showDashboard: boolean

    Returns Thenable<ConnectionResult>

getActiveConnections

  • Get all active connections

    Returns Thenable<Connection[]>

getConnection

  • Get connection profile by its owner uri

    Parameters

    • ownerUri: string

      The owner uri of the connection

    Returns Thenable<ConnectionProfile>

    Thenable to return the connection profile matching the ownerUri

getConnectionString

  • getConnectionString(connectionId: string, includePassword: boolean): Thenable<string>
  • Get connection string

    Parameters

    • connectionId: string
    • includePassword: boolean

    Returns Thenable<string>

getConnections

  • Get known connection profiles including active connections, recent connections and saved connections.

    Parameters

    • Optional activeConnectionsOnly: boolean

      Indicates whether only get the active connections, default value is false.

    Returns Thenable<ConnectionProfile[]>

    array of connections

getCredentials

  • getCredentials(connectionId: string): Thenable<{}>
  • Get the credentials for a connection

    Parameters

    • connectionId: string

      The id of the connection

    Returns Thenable<{}>

    A dictionary containing the credentials as they would be included in the connection's options dictionary

getCurrentConnection

  • Get the current connection based on the active editor or Object Explorer selection

    Returns Thenable<ConnectionProfile>

getServerInfo

  • getServerInfo(connectionId: string): Thenable<ServerInfo>
  • Get ServerInfo for a connectionId

    Parameters

    • connectionId: string

      The id of the connection

    Returns Thenable<ServerInfo>

    ServerInfo

getUriForConnection

  • getUriForConnection(connectionId: string): Thenable<string>
  • Get a URI corresponding to the given connection so that it can be used with data providers and other APIs that require a connection API. Note: If the given connection corresponds to multiple URIs this may return any of them

    Parameters

    • connectionId: string

      The ID of the connection

    Returns Thenable<string>

listDatabases

  • listDatabases(connectionId: string): Thenable<string[]>
  • List the databases that can be accessed from the given connection

    Parameters

    • connectionId: string

      The ID of the connection

    Returns Thenable<string[]>

    An list of names of databases

openConnectionDialog

  • Opens the connection dialog, calls the callback with the result. If connection was successful returns the connection otherwise returns undefined

    Parameters

    Returns Thenable<Connection>

registerConnectionEventListener

  • Register a connection event listener

    Parameters

    Returns vscode.Disposable

Generated using TypeDoc