DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
SessionExtensions.cs
Go to the documentation of this file.
1 using System;
2 
3 using Deveel.Data.Sql;
4 
5 namespace Deveel.Data.Diagnostics {
6  public static class SessionExtensions {
7  public static void OnBegin(this ISession session) {
8  session.Database().OnSessionBegin(session.User.Name, session.Transaction.CommitId);
9  }
10 
11  public static void OnCommit(this ISession session) {
12  session.Database().OnSessionCommit(session.User.Name, session.Transaction.CommitId);
13  }
14 
15  public static void OnRollback(this ISession session) {
16  session.Database().OnSessionRollback(session.User.Name, session.Transaction.CommitId);
17  }
18 
19  public static void OnQuery(this ISession session, SqlQuery query) {
20  session.OnEvent(new QueryEvent(query));
21  }
22  }
23 }
static void OnCommit(this ISession session)
static void OnRollback(this ISession session)
static void OnBegin(this ISession session)
static void OnQuery(this ISession session, SqlQuery query)
ITransaction Transaction
Gets the instance of ITransaction that handles the transactional operations of this session...
Definition: ISession.cs:46
An isolated session to a given database for a given user, encapsulating the transaction for operation...
Definition: ISession.cs:30