Class Rowset
Implements a rowset that supports row change logging and CRUD operations. Rowsets are not optimal for data replication as they perform linear search which is slow, however Rowset class supports sorting. In contrast, Tables are kind of rowsets that keep data pre-sorted by key thus facilitating quick searching
Implements
System.Collections.Generic.IList<Row>
System.Collections.Generic.ICollection<Row>
System.Collections.Generic.IEnumerable<Row>
System.Collections.IEnumerable
System.Collections.Generic.IComparer<Row>
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()
Namespace: NFX.DataAccess.CRUD
Assembly: NFX.dll
Syntax
[Serializable]
public class Rowset : RowsetBase, IList<Row>, ICollection<Row>, IEnumerable<Row>, IEnumerable, IComparer<Row>, IJSONWritable, IValidatable
Constructors
Rowset(RowsetBase, Func<Row, Boolean>)
Creates a shallow copy from another rowset, optionally applying a filter
Declaration
public Rowset(RowsetBase other, Func<Row, bool> filter = null)
Parameters
Type | Name | Description |
---|---|---|
RowsetBase | other | |
System.Func<Row, System.Boolean> | filter |
Rowset(Schema)
Creates an empty rowset
Declaration
public Rowset(Schema schema)
Parameters
Type | Name | Description |
---|---|---|
Schema | schema |
Properties
SortDefinition
Sort definition is a comma-separated field name list where every field may optionally be prefixed with
+
for ascending or -
for descending sort order specifier. Example: "FirstName,-DOB"
Declaration
public string SortDefinition { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Compare(Row, Row)
Declaration
public override int Compare(Row rowA, Row rowB)
Parameters
Type | Name | Description |
---|---|---|
Row | rowA | |
Row | rowB |
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
DoInsert(Row)
Declaration
protected override int DoInsert(Row row)
Parameters
Type | Name | Description |
---|---|---|
Row | row |
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>