mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-23 01:25:42 -05:00
Added support for most sql connection string properties
This commit is contained in:
@@ -8,6 +8,9 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
||||
/// <summary>
|
||||
/// Message format for the initial connection request
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If this contract is ever changed, be sure to update ConnectionDetailsExtensions methods.
|
||||
/// </remarks>
|
||||
public class ConnectionDetails : ConnectionSummary
|
||||
{
|
||||
/// <summary>
|
||||
@@ -16,6 +19,114 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
||||
/// <returns></returns>
|
||||
public string Password { get; set; }
|
||||
|
||||
// TODO Handle full set of properties
|
||||
/// <summary>
|
||||
/// Gets or sets the authentication to use.
|
||||
/// </summary>
|
||||
public string AuthenticationType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a Boolean value that indicates whether SQL Server uses SSL encryption for all data sent between the client and server if the server has a certificate installed.
|
||||
/// </summary>
|
||||
public bool? Encrypt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value that indicates whether the channel will be encrypted while bypassing walking the certificate chain to validate trust.
|
||||
/// </summary>
|
||||
public bool? TrustServerCertificate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a Boolean value that indicates if security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state.
|
||||
/// </summary>
|
||||
public bool? PersistSecurityInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.
|
||||
/// </summary>
|
||||
public int? ConnectTimeout { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The number of reconnections attempted after identifying that there was an idle connection failure.
|
||||
/// </summary>
|
||||
public int? ConnectRetryCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Amount of time (in seconds) between each reconnection attempt after identifying that there was an idle connection failure.
|
||||
/// </summary>
|
||||
public int? ConnectRetryInterval { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the application associated with the connection string.
|
||||
/// </summary>
|
||||
public string ApplicationName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the workstation connecting to SQL Server.
|
||||
/// </summary>
|
||||
public string WorkstationId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Declares the application workload type when connecting to a database in an SQL Server Availability Group.
|
||||
/// </summary>
|
||||
public string ApplicationIntent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the SQL Server Language record name.
|
||||
/// </summary>
|
||||
public string CurrentLanguage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a Boolean value that indicates whether the connection will be pooled or explicitly opened every time that the connection is requested.
|
||||
/// </summary>
|
||||
public bool? Pooling { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum number of connections allowed in the connection pool for this specific connection string.
|
||||
/// </summary>
|
||||
public int? MaxPoolSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the minimum number of connections allowed in the connection pool for this specific connection string.
|
||||
/// </summary>
|
||||
public int? MinPoolSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the minimum time, in seconds, for the connection to live in the connection pool before being destroyed.
|
||||
/// </summary>
|
||||
public int? LoadBalanceTimeout { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a Boolean value that indicates whether replication is supported using the connection.
|
||||
/// </summary>
|
||||
public bool? Replication { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a string that contains the name of the primary data file. This includes the full path name of an attachable database.
|
||||
/// </summary>
|
||||
public string AttachDbFilename { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name or address of the partner server to connect to if the primary server is down.
|
||||
/// </summary>
|
||||
public string FailoverPartner { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If your application is connecting to an AlwaysOn availability group (AG) on different subnets, setting MultiSubnetFailover=true provides faster detection of and connection to the (currently) active server.
|
||||
/// </summary>
|
||||
public bool? MultiSubnetFailover { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When true, an application can maintain multiple active result sets (MARS).
|
||||
/// </summary>
|
||||
public bool? MultipleActiveResultSets { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the size in bytes of the network packets used to communicate with an instance of SQL Server.
|
||||
/// </summary>
|
||||
public int? PacketSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a string value that indicates the type system the application expects.
|
||||
/// </summary>
|
||||
public string TypeSystemVersion { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,29 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
||||
ServerName = details.ServerName,
|
||||
DatabaseName = details.DatabaseName,
|
||||
UserName = details.UserName,
|
||||
Password = details.Password
|
||||
Password = details.Password,
|
||||
AuthenticationType = details.AuthenticationType,
|
||||
Encrypt = details.Encrypt,
|
||||
TrustServerCertificate = details.TrustServerCertificate,
|
||||
PersistSecurityInfo = details.PersistSecurityInfo,
|
||||
ConnectTimeout = details.ConnectTimeout,
|
||||
ConnectRetryCount = details.ConnectRetryCount,
|
||||
ConnectRetryInterval = details.ConnectRetryInterval,
|
||||
ApplicationName = details.ApplicationName,
|
||||
WorkstationId = details.WorkstationId,
|
||||
ApplicationIntent = details.ApplicationIntent,
|
||||
CurrentLanguage = details.CurrentLanguage,
|
||||
Pooling = details.Pooling,
|
||||
MaxPoolSize = details.MaxPoolSize,
|
||||
MinPoolSize = details.MinPoolSize,
|
||||
LoadBalanceTimeout = details.LoadBalanceTimeout,
|
||||
Replication = details.Replication,
|
||||
AttachDbFilename = details.AttachDbFilename,
|
||||
FailoverPartner = details.FailoverPartner,
|
||||
MultiSubnetFailover = details.MultiSubnetFailover,
|
||||
MultipleActiveResultSets = details.MultipleActiveResultSets,
|
||||
PacketSize = details.PacketSize,
|
||||
TypeSystemVersion = details.TypeSystemVersion
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user