-
Notifications
You must be signed in to change notification settings - Fork 0
/
Transaction.vb
47 lines (41 loc) · 1.23 KB
/
Transaction.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Imports System.Data.Common
Imports Npgsql
Public Class Transaction
Inherits Databasic.Transaction
Public Overrides Property Instance As DbTransaction
Get
Return Me._instance
End Get
Set(value As DbTransaction)
Me._instance = value
End Set
End Property
Private _instance As NpgsqlTransaction
Public Shadows Sub Rollback(name As String)
Try
Me._instance.Rollback(name)
Me.ConnectionWrapper.OpenedTransaction = Nothing
Catch ex As Exception
Me.ConnectionWrapper.OpenedTransaction = Nothing
Throw ex
End Try
End Sub
Public Sub Save(name As String)
Try
Me._instance.Save(name)
Me.ConnectionWrapper.OpenedTransaction = Nothing
Catch ex As Exception
Me.ConnectionWrapper.OpenedTransaction = Nothing
Throw ex
End Try
End Sub
Public Sub Release(name As String)
Try
Me._instance.Release(name)
Me.ConnectionWrapper.OpenedTransaction = Nothing
Catch ex As Exception
Me.ConnectionWrapper.OpenedTransaction = Nothing
Throw ex
End Try
End Sub
End Class