18 using System.Collections.Generic;
30 : this(transaction, transaction.CurrentSchema()) {
34 if (String.IsNullOrEmpty(currentSchema))
35 throw new ArgumentNullException(
"currentSchema");
37 CurrentSchema =currentSchema;
40 StartedOn = DateTimeOffset.UtcNow;
47 public string CurrentSchema {
get;
private set; }
49 public DateTimeOffset StartedOn {
get;
private set; }
51 public DateTimeOffset? LastCommandTime {
64 get {
return GetMetaData(); }
75 private IEnumerable<KeyValuePair<string, object>>
GetMetaData() {
76 return new Dictionary<string, object> {
82 throw new NotSupportedException();
86 throw new NotSupportedException();
110 return new Query(
this);
void Access(IEnumerable< IDbObject > objects, AccessType accessType)
The system implementation of a transaction model that handles isolated operations within a database c...
Defines a referenced object that can be accessed on a multi-phase level.
ILargeObject CreateLargeObject(long size, bool compressed)
LockingMode
The mode applied to a lock over a resource during a transaction.
void Commit()
Commits all write operation done during the lifetime of this transaction and invalidates it...
IEnumerable< KeyValuePair< string, object > > GetMetaData()
void Exit(IEnumerable< IDbObject > objects, AccessType accessType)
ILargeObject GetLargeObject(ObjectId objId)
void Commit()
Commits the latest changes made by the user in the session.
IEventSource ParentSource
Gets an optional parent source.
void Rollback()
Rollback any write operations done during the lifetime of this transaction and invalidates it...
IEnumerable< KeyValuePair< string, object > > Metadata
Gets the list of metadata associated to the source.
An isolated session to a given database for a given user, encapsulating the transaction for operation...
static readonly User System
void Lock(IEnumerable< IDbObject > objects, AccessType accessType, LockingMode mode)
new ITransactionContext Context
A unique identifier of an object within a database system, that is composed by a reference to the sto...
ISessionContext CreateSessionContext()
SystemSession(ITransaction transaction)
The simplest implementation of a transaction.
void Rollback()
Rolls-back all the modifications made by the user in this session
Provides the information for a user in a database system
SystemSession(ITransaction transaction, string currentSchema)
const string SystemName
The name of the SYSTEM special user.
Represents the origin of system events, providing a mechanism to fill the metadata before dispatching...