Skip to content

Commit

Permalink
Merge branch 'feature/version-update' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
abbgrade committed Nov 25, 2023
2 parents ff83e1f + 81ed716 commit 130bb45
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 104 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Updated Microsoft.Data.SqlClient to 5.1.1.
- Updated System.Management.Automation to 7.2.13.
- Updated System.Management.Automation to 7.2.16 and PowerShell 7.2.16.

### [2.1.1] - 2023-08-16

Expand Down
195 changes: 98 additions & 97 deletions docs/Connect-TSqlInstance.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,141 +99,115 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -ConnectTimeout
{{ Fill ConnectTimeout Description }}
### -AcquireToken
{{ Fill AcquireToken Description }}
```yaml
Type: Int32
Parameter Sets: Properties_Basic, Properties_Basic_withToken, Properties_Basic_acquireToken, Properties_Credential, Properties_CredentialObject
Type: SwitchParameter
Parameter Sets: ConnectionString_acquireToken, Properties_Basic_acquireToken
Aliases:

Required: False
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept pipeline input: False
Accept wildcard characters: False
```
### -ConnectionString
{{ Fill ConnectionString Description }}
```yaml
Type: String
Parameter Sets: ConnectionString
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```
### -Authentication
{{ Fill Authentication Description }}
```yaml
Type: String
Parameter Sets: ConnectionString_withToken, ConnectionString_acquireToken
Type: SqlAuthenticationMethod
Parameter Sets: (All)
Aliases:
Accepted values: NotSpecified, SqlPassword, ActiveDirectoryPassword, ActiveDirectoryIntegrated, ActiveDirectoryInteractive, ActiveDirectoryServicePrincipal, ActiveDirectoryDeviceCodeFlow, ActiveDirectoryManagedIdentity, ActiveDirectoryMSI, ActiveDirectoryDefault

Required: True
Position: 0
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept pipeline input: False
Accept wildcard characters: False
```
### -DataSource
{{ Fill DataSource Description }}
### -ConnectRetryCount
{{ Fill ConnectRetryCount Description }}
```yaml
Type: String
Type: Int32
Parameter Sets: Properties_Basic, Properties_Basic_withToken, Properties_Basic_acquireToken, Properties_Credential, Properties_CredentialObject
Aliases: Server, ServerName, ServerInstance
Aliases: RetryCount

Required: True
Position: 0
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -InitialCatalog
{{ Fill InitialCatalog Description }}
### -ConnectRetryInterval
{{ Fill ConnectRetryInterval Description }}
```yaml
Type: String
Parameter Sets: Properties_Basic, Properties_Credential, Properties_CredentialObject
Aliases: Database, DatabaseName
Type: Int32
Parameter Sets: Properties_Basic, Properties_Basic_withToken, Properties_Basic_acquireToken, Properties_Credential, Properties_CredentialObject
Aliases: RetryInterval

Required: False
Position: 1
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -ConnectTimeout
{{ Fill ConnectTimeout Description }}
```yaml
Type: String
Parameter Sets: Properties_Basic_withToken, Properties_Basic_acquireToken
Aliases: Database, DatabaseName
Type: Int32
Parameter Sets: Properties_Basic, Properties_Basic_withToken, Properties_Basic_acquireToken, Properties_Credential, Properties_CredentialObject
Aliases:

Required: True
Position: 1
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Password
{{ Fill Password Description }}
### -ConnectionString
{{ Fill ConnectionString Description }}
```yaml
Type: SecureString
Parameter Sets: Properties_Credential
Type: String
Parameter Sets: ConnectionString
Aliases:

Required: True
Position: 1
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```
### -Port
{{ Fill Port Description }}
```yaml
Type: Int32
Parameter Sets: Properties_Basic, Properties_Basic_withToken, Properties_Basic_acquireToken, Properties_Credential, Properties_CredentialObject
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -UserId
{{ Fill UserId Description }}
```yaml
Type: String
Parameter Sets: Properties_Credential
Parameter Sets: ConnectionString_withToken, ConnectionString_acquireToken
Aliases:

Required: True
Position: 1
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```
### -Authentication
{{ Fill Authentication Description }}
### -Credential
{{ Fill Credential Description }}
```yaml
Type: SqlAuthenticationMethod
Parameter Sets: (All)
Type: PSCredential
Parameter Sets: Properties_CredentialObject
Aliases:

Required: False
Expand All @@ -243,48 +217,45 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -ConnectRetryCount
{{ Fill ConnectRetryCount Description }}
### -DataSource
{{ Fill DataSource Description }}
```yaml
Type: Int32
Type: String
Parameter Sets: Properties_Basic, Properties_Basic_withToken, Properties_Basic_acquireToken, Properties_Credential, Properties_CredentialObject
Aliases: RetryCount
Aliases: Server, ServerName, ServerInstance

Required: False
Position: Named
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -ConnectRetryInterval
{{ Fill ConnectRetryInterval Description }}
### -InitialCatalog
{{ Fill InitialCatalog Description }}
```yaml
Type: Int32
Parameter Sets: Properties_Basic, Properties_Basic_withToken, Properties_Basic_acquireToken, Properties_Credential, Properties_CredentialObject
Aliases: RetryInterval
Type: String
Parameter Sets: Properties_Basic, Properties_Credential, Properties_CredentialObject
Aliases: Database, DatabaseName

Required: False
Position: Named
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -Credential
{{ Fill Credential Description }}
```yaml
Type: PSCredential
Parameter Sets: Properties_CredentialObject
Aliases:
Type: String
Parameter Sets: Properties_Basic_withToken, Properties_Basic_acquireToken
Aliases: Database, DatabaseName

Required: False
Position: Named
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
Expand All @@ -303,18 +274,33 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -AcquireToken
{{ Fill AcquireToken Description }}
### -Password
{{ Fill Password Description }}
```yaml
Type: SwitchParameter
Parameter Sets: ConnectionString_acquireToken, Properties_Basic_acquireToken
Type: SecureString
Parameter Sets: Properties_Credential
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```
### -Port
{{ Fill Port Description }}
```yaml
Type: Int32
Parameter Sets: Properties_Basic, Properties_Basic_withToken, Properties_Basic_acquireToken, Properties_Credential, Properties_CredentialObject
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
Expand Down Expand Up @@ -348,6 +334,21 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -UserId
{{ Fill UserId Description }}
```yaml
Type: String
Parameter Sets: Properties_Credential
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
Expand Down
2 changes: 1 addition & 1 deletion src/PsSqlClient/PsSqlClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.1" />
<PackageReference Include="System.Management.Automation" Version="7.2.13" />
<PackageReference Include="System.Management.Automation" Version="7.2.16" />
<PackageReference Include="Microsoft.Azure.Services.AppAuthentication" Version="1.6.2" />
</ItemGroup>

Expand Down
Binary file modified src/PsSqlClient/PsSqlClient.psd1
Binary file not shown.
10 changes: 6 additions & 4 deletions src/PsSqlClient/PsSqlClient.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $LoadedAssemblies = [System.AppDomain]::CurrentDomain.GetAssemblies()
"$PSScriptRoot/Azure.Identity.dll",
"$PSScriptRoot/Microsoft.Identity.Client.dll",
"$PSScriptRoot/Microsoft.SqlServer.Server.dll",
"$PSScriptRoot/runtimes/win/lib/netcoreapp3.1/Microsoft.Data.SqlClient.dll"
"$PSScriptRoot/runtimes/win/lib/net6.0/Microsoft.Data.SqlClient.dll"
) | ForEach-Object {
[System.IO.FileInfo] $RequiredAssemblyPath = $_
If ( -not $RequiredAssemblyPath.Exists ) {
Expand All @@ -29,9 +29,11 @@ $LoadedAssemblies = [System.AppDomain]::CurrentDomain.GetAssemblies()
X86 { 'win-x86' }
Arm { 'win-arm' }
}
$NativeDllTargetDirectory = "$PSScriptRoot/runtimes/win/lib/netcoreapp3.1"
if ( -Not ( Test-Path "$NativeDllTargetDirectory/Microsoft.Data.SqlClient.SNI.dll" ) ) {
Copy-Item "$PSScriptRoot/runtimes/$Runtime/native/Microsoft.Data.SqlClient.SNI.dll" -Destination $NativeDllTargetDirectory
if ( $Runtime ) {
$NativeDllTargetDirectory = "$PSScriptRoot/runtimes/win/lib/net6.0"
if ( -Not ( Test-Path "$NativeDllTargetDirectory/Microsoft.Data.SqlClient.SNI.dll" ) ) {
Copy-Item "$PSScriptRoot/runtimes/$Runtime/native/Microsoft.Data.SqlClient.SNI.dll" -Destination $NativeDllTargetDirectory
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion test/Test-Connection.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ Describe Test-Connection {

AfterAll {
if ( $Connection ) {
Disconnect-TSqlInstance -Connection $Connection -ErrorAction Continue
try {
Disconnect-TSqlInstance -Connection $Connection -ErrorAction Continue
} catch {}
}
}

Expand Down

0 comments on commit 130bb45

Please sign in to comment.