DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Properties | Private Member Functions | List of all members
Deveel.Data.SystemSession Class Reference
Inheritance diagram for Deveel.Data.SystemSession:
Deveel.Data.ISession Deveel.Data.Diagnostics.IEventSource

Public Member Functions

 SystemSession (ITransaction transaction)
 
 SystemSession (ITransaction transaction, string currentSchema)
 
void Dispose ()
 
ILargeObject CreateLargeObject (long size, bool compressed)
 
ILargeObject GetLargeObject (ObjectId objId)
 
void Access (IEnumerable< IDbObject > objects, AccessType accessType)
 
void Exit (IEnumerable< IDbObject > objects, AccessType accessType)
 
void Lock (IEnumerable< IDbObject > objects, AccessType accessType, LockingMode mode)
 
void Commit ()
 Commits the latest changes made by the user in the session. More...
 
void Rollback ()
 Rolls-back all the modifications made by the user in this session More...
 
IQuery CreateQuery ()
 

Properties

string CurrentSchema [get, private set]
 
DateTimeOffset StartedOn [get, private set]
 
DateTimeOffset LastCommandTime [get]
 
User User [get]
 
ITransaction Transaction [get, private set]
 
ISessionContext Context [get, private set]
 
IEnumerable< KeyValuePair< string, object > > IEventSource. Metadata [get]
 
IEventSource IEventSource. ParentSource [get]
 
IContext IEventSource. Context [get]
 
- Properties inherited from Deveel.Data.ISession
string CurrentSchema [get]
 Gets the name of the current schema of this session. More...
 
DateTimeOffset StartedOn [get]
 
DateTimeOffset LastCommandTime [get]
 
User User [get]
 
ITransaction Transaction [get]
 Gets the instance of ITransaction that handles the transactional operations of this session. More...
 
new ISessionContext Context [get]
 
- Properties inherited from Deveel.Data.Diagnostics.IEventSource
IContext Context [get]
 
IEventSource ParentSource [get]
 Gets an optional parent source. More...
 
IEnumerable< KeyValuePair< string, object > > Metadata [get]
 Gets the list of metadata associated to the source. More...
 

Private Member Functions

IEnumerable< KeyValuePair< string, object > > GetMetaData ()
 

Detailed Description

Definition at line 28 of file SystemSession.cs.

Constructor & Destructor Documentation

Deveel.Data.SystemSession.SystemSession ( ITransaction  transaction)
inline

Definition at line 29 of file SystemSession.cs.

30  : this(transaction, transaction.CurrentSchema()) {
31  }
Deveel.Data.SystemSession.SystemSession ( ITransaction  transaction,
string  currentSchema 
)
inline

Definition at line 33 of file SystemSession.cs.

33  {
34  if (String.IsNullOrEmpty(currentSchema))
35  throw new ArgumentNullException("currentSchema");
36 
37  CurrentSchema =currentSchema;
38  Transaction = transaction;
39  Context = transaction.Context.CreateSessionContext();
40  StartedOn = DateTimeOffset.UtcNow;
41  }
A long string in the system.
The system implementation of a transaction model that handles isolated operations within a database c...
Definition: Transaction.cs:35
ISessionContext Context
new ITransactionContext Context
Definition: ITransaction.cs:31
DateTimeOffset StartedOn

Member Function Documentation

void Deveel.Data.SystemSession.Access ( IEnumerable< IDbObject objects,
AccessType  accessType 
)
inline

Implements Deveel.Data.ISession.

Definition at line 89 of file SystemSession.cs.

89  {
90  // A system session bypasses any lock
91  }
void Deveel.Data.SystemSession.Commit ( )
inline

Commits the latest changes made by the user in the session.

See also
ITransaction

Implements Deveel.Data.ISession.

Definition at line 101 of file SystemSession.cs.

101  {
103  }
The system implementation of a transaction model that handles isolated operations within a database c...
Definition: Transaction.cs:35
void Commit()
Commits all write operation done during the lifetime of this transaction and invalidates it...
Definition: Transaction.cs:179
ILargeObject Deveel.Data.SystemSession.CreateLargeObject ( long  size,
bool  compressed 
)
inline

Definition at line 81 of file SystemSession.cs.

81  {
82  throw new NotSupportedException();
83  }
IQuery Deveel.Data.SystemSession.CreateQuery ( )
inline

Implements Deveel.Data.ISession.

Definition at line 109 of file SystemSession.cs.

109  {
110  return new Query(this);
111  }
void Deveel.Data.SystemSession.Dispose ( )
inline

Definition at line 43 of file SystemSession.cs.

43  {
44  Transaction = null;
45  }
The system implementation of a transaction model that handles isolated operations within a database c...
Definition: Transaction.cs:35
void Deveel.Data.SystemSession.Exit ( IEnumerable< IDbObject objects,
AccessType  accessType 
)
inline

Implements Deveel.Data.ISession.

Definition at line 93 of file SystemSession.cs.

93  {
94  // A system session does not hold any lock
95  }
ILargeObject Deveel.Data.SystemSession.GetLargeObject ( ObjectId  objId)
inline

Definition at line 85 of file SystemSession.cs.

85  {
86  throw new NotSupportedException();
87  }
IEnumerable<KeyValuePair<string, object> > Deveel.Data.SystemSession.GetMetaData ( )
inlineprivate

Definition at line 75 of file SystemSession.cs.

75  {
76  return new Dictionary<string, object> {
77  { "session.user", User.SystemName }
78  };
79  }
Provides the information for a user in a database system
Definition: User.cs:27
const string SystemName
The name of the SYSTEM special user.
Definition: User.cs:52
void Deveel.Data.SystemSession.Lock ( IEnumerable< IDbObject objects,
AccessType  accessType,
LockingMode  mode 
)
inline

Implements Deveel.Data.ISession.

Definition at line 97 of file SystemSession.cs.

97  {
98  // A system session does not hold any lock
99  }
void Deveel.Data.SystemSession.Rollback ( )
inline

Rolls-back all the modifications made by the user in this session

<seealse cref="ITransaction">

Implements Deveel.Data.ISession.

Definition at line 105 of file SystemSession.cs.

105  {
107  }
The system implementation of a transaction model that handles isolated operations within a database c...
Definition: Transaction.cs:35
void Rollback()
Rollback any write operations done during the lifetime of this transaction and invalidates it...
Definition: Transaction.cs:239

Property Documentation

ISessionContext Deveel.Data.SystemSession.Context
getprivate set

Definition at line 61 of file SystemSession.cs.

IContext IEventSource. Deveel.Data.SystemSession.Context
getprivate

Definition at line 71 of file SystemSession.cs.

string Deveel.Data.SystemSession.CurrentSchema
getprivate set

Definition at line 47 of file SystemSession.cs.

DateTimeOffset Deveel.Data.SystemSession.LastCommandTime
get

Definition at line 51 of file SystemSession.cs.

IEnumerable<KeyValuePair<string, object> > IEventSource. Deveel.Data.SystemSession.Metadata
getprivate

Definition at line 63 of file SystemSession.cs.

IEventSource IEventSource. Deveel.Data.SystemSession.ParentSource
getprivate

Definition at line 67 of file SystemSession.cs.

DateTimeOffset Deveel.Data.SystemSession.StartedOn
getprivate set

Definition at line 49 of file SystemSession.cs.

ITransaction Deveel.Data.SystemSession.Transaction
getprivate set

Definition at line 59 of file SystemSession.cs.

User Deveel.Data.SystemSession.User
get

Definition at line 55 of file SystemSession.cs.


The documentation for this class was generated from the following file: