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
Table
Implements
System.Collections.Generic.IList<
Doc>
System.Collections.Generic.ICollection<
Doc>
System.Collections.Generic.IEnumerable<
Doc>
System.Collections.IEnumerable
System.Collections.Generic.IComparer<
Doc>
Inherited Members
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()
Assembly: Azos.dll
Syntax
[Serializable]
public class Table : RowsetBase, IList<Doc>, ICollection<Doc>, IEnumerable<Doc>, IEnumerable, IComparer<Doc>, IJSONWritable, IValidatable
Constructors
Table(Rowset, Func<Doc, Boolean>)
Creates a shallow copy from another rowset resorting data per schema key definition, optionally applying a filter
Declaration
public Table(Rowset other, Func<Doc, bool> filter = null)
Parameters
Type |
Name |
Description |
Rowset |
other |
|
System.Func<Doc, System.Boolean> |
filter |
|
Table(Schema)
Declaration
public Table(Schema schema)
Parameters
Type |
Name |
Description |
Schema |
schema |
|
Table(Table, Func<Doc, Boolean>)
Creates a shallow copy from another table, optionally applying a filter
Declaration
public Table(Table other, Func<Doc, bool> filter = null)
Parameters
Type |
Name |
Description |
Table |
other |
|
System.Func<Doc, System.Boolean> |
filter |
|
Properties
Item[Int32]
This method does not support setting rows in table
Declaration
public override Doc this[int index] { get; set; }
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Property Value
Overrides
Methods
Compare(Doc, Doc)
Compares two rows based on their key fields. Always compares in ascending direction
Declaration
public override int Compare(Doc rowA, Doc rowB)
Parameters
Type |
Name |
Description |
Doc |
rowA |
|
Doc |
rowB |
|
Returns
Type |
Description |
System.Int32 |
|
Overrides
CompareRows(Schema, Doc, Doc)
Compares two rows based on their key fields. Always compares in ascending direction
Declaration
public static int CompareRows(Schema schema, Doc rowA, Doc rowB)
Parameters
Returns
Type |
Description |
System.Int32 |
|
Insert(Int32, Doc)
This is IList member implementation, index is ignored
Declaration
public override void Insert(int index, Doc item)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Doc |
item |
|
Overrides
SearchForDoc(Doc, out Int32)
Performs binary search on a sorted table
Declaration
protected override int SearchForDoc(Doc doc, out int index)
Parameters
Type |
Name |
Description |
Doc |
doc |
|
System.Int32 |
index |
|
Returns
Type |
Description |
System.Int32 |
|
Overrides
Implements
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.Collections.Generic.IComparer<T>
Extension Methods