DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
TableCommitEvent.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 
6 using Deveel.Data.Sql;
7 
8 namespace Deveel.Data.Transactions {
9  public sealed class TableCommitEvent : Event {
10  public TableCommitEvent(ObjectName tableName, int tableId, IEnumerable<int> addedRows, IEnumerable<int> removedRows) {
11  if (tableName == null)
12  throw new ArgumentNullException("tableName");
13 
14  TableName = tableName;
15  TableId = tableId;
16  AddedRows = addedRows;
17  RemovedRows = removedRows;
18  }
19 
20  public ObjectName TableName { get; private set; }
21 
22  public int TableId { get; private set; }
23 
24  public IEnumerable<int> AddedRows { get; private set; }
25 
26  public IEnumerable<int> RemovedRows { get; private set; }
27 
28  protected override void GetEventData(Dictionary<string, object> data) {
29  data[KnownEventMetadata.TableId] = TableId;
30  data[KnownEventMetadata.TableName] = TableName.FullName;
31  data["table.addedRows"] = AddedRows.ToArray();
32  data["table.removedRows"] = RemovedRows.ToArray();
33  }
34  }
35 }
Describes the name of an object within a database.
Definition: ObjectName.cs:44
TableCommitEvent(ObjectName tableName, int tableId, IEnumerable< int > addedRows, IEnumerable< int > removedRows)
override void GetEventData(Dictionary< string, object > data)