Show / Hide Table of Contents

Class Table

Implements a master table. Tables are rowsets that are pre-sorted by keys. They are used in scenarios when in-memory data replication is needed. A table supports efficient FindKey() operation but does not support sorting. This class is not thread-safe.

Inheritance
System.Object
RowsetBase
Table
Implements
System.Collections.Generic.IList<Row>
System.Collections.Generic.ICollection<Row>
System.Collections.Generic.IEnumerable<Row>
System.Collections.IEnumerable
System.Collections.Generic.IComparer<Row>
IJSONWritable
IValidatable
Inherited Members
RowsetBase.FromJSON(String, Boolean, Boolean)
RowsetBase.FromJSON(JSONDataMap, Boolean, Boolean)
RowsetBase.FromJSON(JSONDataMap, Boolean, Boolean, Boolean, SetFieldFunc)
RowsetBase.FromJSON<T>(String, RowsetBase, SetFieldFunc)
RowsetBase.FromJSON<T>(JSONDataMap, RowsetBase, SetFieldFunc)
RowsetBase.m_Schema
RowsetBase.m_List
RowsetBase.m_Changes
RowsetBase.InstanceGUID
RowsetBase.Schema
RowsetBase.Count
RowsetBase.AsReadonlyIList
RowsetBase.LogChanges
RowsetBase.Changes
RowsetBase.ChangeCount
RowsetBase.ContextMap
RowsetBase.Context
RowsetBase.Insert(Row)
RowsetBase.Update(Row, IDataStoreKey, Func<Row, Row, Row>)
RowsetBase.Upsert(Row, Func<Row, Boolean>, Func<Row, Row, Row>)
RowsetBase.Delete(Row, IDataStoreKey)
RowsetBase.Delete(Object[])
RowsetBase.Purge()
RowsetBase.DeleteAll()
RowsetBase.PurgeChanges()
RowsetBase.KeyRowFromValues(Object[])
RowsetBase.FindByKey(Row)
RowsetBase.FindByKey(Object[])
RowsetBase.FindByKey(Row, Func<Row, Boolean>)
RowsetBase.FindByKey(Func<Row, Boolean>, Object[])
RowsetBase.FindIndexByKey(Row)
RowsetBase.FindIndexByKey(Object[])
RowsetBase.FindIndexByKey(Row, Func<Row, Boolean>)
RowsetBase.FindIndexByKey(Func<Row, Boolean>, Object[])
RowsetBase.GetChangeAt(Int32)
RowsetBase.Validate(String)
RowsetBase.GetEnumerator()
RowsetBase.IEnumerable.GetEnumerator()
RowsetBase.IndexOf(Row)
RowsetBase.RemoveAt(Int32)
RowsetBase.Add(Row)
RowsetBase.Clear()
RowsetBase.Contains(Row)
RowsetBase.CopyTo(Row[], Int32)
RowsetBase.IsReadOnly
RowsetBase.Remove(Row)
RowsetBase.WriteAsJSON(TextWriter, Int32, JSONWritingOptions)
RowsetBase.Check(Row)
RowsetBase.DoInsert(Row)
RowsetBase.DoUpdate(Row, IDataStoreKey, Func<Row, Row, Row>)
RowsetBase.DoUpgrade(Int32, Row, Func<Row, Row, Row>)
RowsetBase.DoUpsert(Row, Func<Row, Boolean>, Func<Row, Row, Row>)
RowsetBase.DoDelete(Row, IDataStoreKey)
RowsetBase.DoKeyRowFromValues<T>(T, Object[])
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX.DataAccess.CRUD
Assembly: NFX.dll
Syntax
[Serializable]
public class Table : RowsetBase, IList<Row>, ICollection<Row>, IEnumerable<Row>, IEnumerable, IComparer<Row>, IJSONWritable, IValidatable

Constructors

Table(Rowset, Func<Row, Boolean>)

Creates a shallow copy from another rowset resorting data per schema key definition, optionally applying a filter

Declaration
public Table(Rowset other, Func<Row, bool> filter = null)
Parameters
Type Name Description
Rowset other
System.Func<Row, System.Boolean> filter

Table(Schema)

Creates an empty table

Declaration
public Table(Schema schema)
Parameters
Type Name Description
Schema schema

Table(Table, Func<Row, Boolean>)

Creates a shallow copy from another table, optionally applying a filter

Declaration
public Table(Table other, Func<Row, bool> filter = null)
Parameters
Type Name Description
Table other
System.Func<Row, System.Boolean> filter

Properties

Item[Int32]

This method does not support setting rows in table

Declaration
public override Row this[int index] { get; set; }
Parameters
Type Name Description
System.Int32 index
Property Value
Type Description
Row
Overrides
RowsetBase.Item[Int32]

Methods

Compare(Row, Row)

Compares two rows based on their key fields. Always compares in ascending direction

Declaration
public override int Compare(Row rowA, Row rowB)
Parameters
Type Name Description
Row rowA
Row rowB
Returns
Type Description
System.Int32
Overrides
RowsetBase.Compare(Row, Row)

CompareRows(Schema, Row, Row)

Compares two rows based on their key fields. Always compares in ascending direction

Declaration
public static int CompareRows(Schema schema, Row rowA, Row rowB)
Parameters
Type Name Description
Schema schema
Row rowA
Row rowB
Returns
Type Description
System.Int32

Insert(Int32, Row)

This is IList member implementation, index is ignored

Declaration
public override void Insert(int index, Row item)
Parameters
Type Name Description
System.Int32 index
Row item
Overrides
RowsetBase.Insert(Int32, Row)

SearchForRow(Row, out Int32)

Performs binary search on a sorted table

Declaration
protected override int SearchForRow(Row row, out int index)
Parameters
Type Name Description
Row row
System.Int32 index
Returns
Type Description
System.Int32
Overrides
RowsetBase.SearchForRow(Row, out Int32)

Implements

System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.Collections.Generic.IComparer<T>
IJSONWritable
IValidatable

Extension Methods

CollectionUtils.ForEach<T>(IEnumerable<T>, Action<T>)
CollectionUtils.ForEach<T>(IEnumerable<T>, Action<T, Int32>)
CollectionUtils.SkipLast<T>(IEnumerable<T>)
CollectionUtils.SkipLast<T>(IEnumerable<T>, Int32)
CollectionUtils.FirstMin<TResult, TComparand>(IEnumerable<TResult>, Func<TResult, TComparand>)
CollectionUtils.FirstMin<TResult, TComparand>(IEnumerable<TResult>, Func<TResult, TComparand>, out TComparand)
CollectionUtils.FirstMax<TResult, TComparand>(IEnumerable<TResult>, Func<TResult, TComparand>)
CollectionUtils.FirstMax<TResult, TComparand>(IEnumerable<TResult>, Func<TResult, TComparand>, out TComparand)
CollectionUtils.FirstOrAnyOrDefault<TResult>(IEnumerable<TResult>, Func<TResult, Boolean>)
CollectionUtils.Distinct<TResult, TKey>(IEnumerable<TResult>, Func<TResult, TKey>)
DataUtils.AsEnumerableOf<TRow>(IEnumerable<Row>)
MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
LookAheadExtensions.AsLookAheadEnumerable<T>(IEnumerable<T>)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX