Esempio n. 1
0
 public NativeResult[] Execute(NativeSessionHandle sessionHandle, NativeExecuteOperation[] operations)
 {
     try
     {
         return(GetNativeSession(sessionHandle).Execute(operations));
     }
     catch (Exception exception)
     {
         throw NativeCLIUtility.WrapException(exception);
     }
 }
Esempio n. 2
0
 public int GetTransactionCount(NativeSessionHandle sessionHandle)
 {
     try
     {
         return(GetNativeSession(sessionHandle).Process.TransactionCount);
     }
     catch (Exception exception)
     {
         throw NativeCLIUtility.WrapException(exception);
     }
 }
Esempio n. 3
0
 public NativeResult Execute(NativeSessionHandle sessionHandle, string statement, NativeParam[] paramsValue, NativeExecutionOptions options)
 {
     try
     {
         return(GetNativeSession(sessionHandle).Execute(statement, paramsValue, options));
     }
     catch (Exception exception)
     {
         throw NativeCLIUtility.WrapException(exception);
     }
 }
Esempio n. 4
0
 public void RollbackTransaction(NativeSessionHandle sessionHandle)
 {
     try
     {
         GetNativeSession(sessionHandle).Process.RollbackTransaction();
     }
     catch (Exception exception)
     {
         throw NativeCLIUtility.WrapException(exception);
     }
 }
Esempio n. 5
0
 public void BeginTransaction(NativeSessionHandle sessionHandle, NativeIsolationLevel isolationLevel)
 {
     try
     {
         GetNativeSession(sessionHandle).Process.BeginTransaction(NativeCLIUtility.NativeIsolationLevelToIsolationLevel(isolationLevel));
     }
     catch (Exception exception)
     {
         throw NativeCLIUtility.WrapException(exception);
     }
 }
Esempio n. 6
0
 public void StopSession(NativeSessionHandle sessionHandle)
 {
     try
     {
         StopNativeSession(RemoveNativeSession(sessionHandle));
     }
     catch (Exception exception)
     {
         throw NativeCLIUtility.WrapException(exception);
     }
 }
Esempio n. 7
0
 public NativeResult[] Execute(NativeSessionInfo sessionInfo, NativeExecuteOperation[] operations)
 {
     try
     {
         NativeSession nativeSession = StartNativeSession(sessionInfo);
         try
         {
             return(nativeSession.Execute(operations));
         }
         finally
         {
             StopNativeSession(nativeSession);
         }
     }
     catch (Exception exception)
     {
         throw NativeCLIUtility.WrapException(exception);
     }
 }
Esempio n. 8
0
 public NativeResult Execute(NativeSessionInfo sessionInfo, string statement, NativeParam[] paramsValue, NativeExecutionOptions options)
 {
     try
     {
         NativeSession nativeSession = StartNativeSession(sessionInfo);
         try
         {
             return(nativeSession.Execute(statement, paramsValue, options));
         }
         finally
         {
             StopNativeSession(nativeSession);
         }
     }
     catch (Exception exception)
     {
         throw NativeCLIUtility.WrapException(exception);
     }
 }
Esempio n. 9
0
 public NativeSessionHandle StartSession(NativeSessionInfo sessionInfo)
 {
     try
     {
         NativeSession nativeSession = StartNativeSession(sessionInfo);
         try
         {
             return(AddNativeSession(nativeSession));
         }
         catch
         {
             StopNativeSession(nativeSession);
             throw;
         }
     }
     catch (Exception exception)
     {
         throw NativeCLIUtility.WrapException(exception);
     }
 }