cleanup: Fix build warnings
* BlueOrbNLStream.cs * ChangeTableNameStream.cs * FilterStream.cs * FilterStream.cs * GroupByOutputTable.cs * GroupByStream.cs * JoinForeignTable.cs * MultiRowRollingMathStream.cs * MutableAppendStream.cs * PersistWindowState.cs * PubsubEchoTestStream.cs * RowDictionaryTable.cs * SortedTable.cs * TimeSeriesStream.cs Also add Metadata prop to IDataPacket
This commit is contained in:
1 parent
8bbe850549
commit
75f2678df6
20 files changed
+532
-472
No files matched your search
@@ -43,7 +43,7 @@ namespace BCG {
|
||||
}
|
||||
|
||||
public IBlueRowCollection newRows, addedRows, deletedRows;
|
||||
public IDictionary<string, object> meta_data = null;
|
||||
public Dictionary<string, object> meta_data = null;
|
||||
public DataPacket() { }
|
||||
public DataPacket(IBlueRowCollection newRows, IBlueRowCollection addedRows, IBlueRowCollection deletedRows) {
|
||||
this.newRows = newRows;
|
||||
@@ -54,6 +54,7 @@ namespace BCG {
|
||||
IBlueRowCollection IDataPacket.newRows => newRows;
|
||||
IBlueRowCollection IDataPacket.addedRows => addedRows;
|
||||
IBlueRowCollection IDataPacket.deletedRows => deletedRows;
|
||||
IReadOnlyDictionary<string, object> IDataPacket.Metadata => meta_data;
|
||||
|
||||
public void get_new_added_deleted(out ICollection new_rows, out ICollection added_rows, out ICollection deleted_rows) {
|
||||
new_rows = newRows;
|
||||
@@ -287,15 +288,22 @@ namespace BCG {
|
||||
}
|
||||
|
||||
public class DataPacket<T> : IDataPacket<T> where T : IBlueRow {
|
||||
public DataPacket(IBlueRowCollection<T> newRows, IBlueRowCollection<T> addedRows, IBlueRowCollection<T> deletedRows) {
|
||||
public DataPacket(
|
||||
IBlueRowCollection<T> newRows,
|
||||
IBlueRowCollection<T> addedRows,
|
||||
IBlueRowCollection<T> deletedRows,
|
||||
IReadOnlyDictionary<string, object> metadata = null
|
||||
) {
|
||||
this.newRows = newRows;
|
||||
this.addedRows = addedRows;
|
||||
this.deletedRows = deletedRows;
|
||||
Metadata = metadata ?? DictionaryHelper.empty<string, object>();
|
||||
}
|
||||
|
||||
public IBlueRowCollection<T> newRows { get; }
|
||||
public IBlueRowCollection<T> addedRows { get; }
|
||||
public IBlueRowCollection<T> deletedRows { get; }
|
||||
public IReadOnlyDictionary<string, object> Metadata { get; }
|
||||
|
||||
public static DataPacket<T> Empty(IBlueTableSchema schema) =>
|
||||
new(
|
||||
|
||||
Reference in new issue
Block a user