Skip to content

Commit

Permalink
v1.7.0 - Get-SqlTransaction added, fixes #38
Browse files Browse the repository at this point in the history
  • Loading branch information
mithrandyr committed Feb 16, 2021
1 parent e71cada commit ddcb48c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 33 deletions.
37 changes: 4 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ This module requires PowerShell Version 5.0 or greater

## Latest Version

### 1.7.0

* Minor update to expose the transaction object to the user via the new `Get-SqlTransaction` cmdlet.

### 1.6.2

* added support for .Net Framework 4.6.1 (included library 'DataReaderToPSObject' is compiled against .Net Standard 2.0 which requires shims on .Net 4.6.1). (@jantari)
Expand All @@ -46,37 +50,4 @@ This module requires PowerShell Version 5.0 or greater
* Added -TrustServerCertificate to Open-PostgreConnection (@ili101)
* Added -ProviderTypes to Invoke-SqlQuery (@ili1010)

### 1.5.9

* Fixed issue with `Open-OracleConnection` help (@PaulWalkerUK)
* Added -AsDataTable to Open-SqlQuery (@ili101)
* Added -TrustSSL to Open-PostGreConnection, allowing for self-signed certificates (@ili101)
* Updated -ConnectionName parameter on all cmdlets to no longer allow null or empty strings.
* Added better handling around SqlTransactions when an error is thrown (for SQL Server this happens when the server takes longer than the connectionTimeout, however the transaction action (COMMIT or ROLLBACK) still goes through properly).
* Added default value ("postgres") to -Database for Open-PostGreConnection.
* Added -DBAPrivilege to Open-OracleConnection to allow connecting as SYSOPER or SYSDBA.

### 1.5.4

* Fixed issue with loading the Geometry npgsql extension (Npgsql.NetTopologySuite) when database in connection string did not have PostGIS installed.
* Automatically load geometry npgsql extension on database switch and on re-opening the connection (if current database has PostGIS installed).

### 1.5.3

* Fixed issue with Geometry not being supported in PostGre provider.

### 1.5.2

* Fixed issue with OracleProvider -- binding by position rather than by parameter name. (@Abrechnung1)

### 1.5.1

* Updated tests for Pester v4
* Fixed issue with transactions for MSSQL.
* Fixed issue with ```Show-SqlConnection -all | Close-SqlConnection``` when there are no open connections.
* Updated MySql Provider to 8.0.12, added parameter for SSLmode
* Updated SQLite provider to 1.0.109.1
* Updated Oracle provider to 18.3 (added support for oracleCredential)
* Updated PostGre provider (npgsql) to 4.0.2

[View Version History](VersionHistory.md)
21 changes: 21 additions & 0 deletions SimplySql/Cmdlets/Get-SqlTransaction.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<#
.Synopsis
Gets the underlying transaction object.
.Description
Gets the underlying transaction object for the current connection
or for the connection name specified.
.Parameter ConnectionName
User Defined name for the SqlConnection.
#>
Filter Get-SqlTransaction {
[CmdletBinding()]
Param([parameter(ParameterSetName="single", ValueFromPipeline, Position=0)][ValidateNotNullOrEmpty()][Alias("cn")][string]$ConnectionName = "default")

If(-not (TestConnectionName $ConnectionName)) { return }
Else { $Script:Connections.$ConnectionName.Transaction | Write-Output }

}
Export-ModuleMember -Function Get-SqlTransaction
Binary file modified SimplySql/SimplySql.psd1
Binary file not shown.
4 changes: 4 additions & 0 deletions VersionHistory.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Version History

### 1.7.0

* Minor update to expose the transaction object to the user via the new `Get-SqlTransaction` cmdlet.

### 1.6.2

* added support for .Net Framework 4.6.1 (included library 'DataReaderToPSObject' is compiled against .Net Standard 2.0 which requires shims on .Net 4.6.1). (@jantari)
Expand Down

0 comments on commit ddcb48c

Please sign in to comment.