Class Rowset
Implements a rowset that supports row doc 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<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()
Namespace: Azos.Data
Assembly: Azos.dll
Syntax
[Serializable]
public class Rowset : RowsetBase, IList<Doc>, ICollection<Doc>, IEnumerable<Doc>, IEnumerable, IComparer<Doc>, IJSONWritable, IValidatable
Constructors
Rowset(RowsetBase, Func<Doc, Boolean>)
Creates a shallow copy from another rowset, optionally applying a filter
Declaration
public Rowset(RowsetBase other, Func<Doc, bool> filter = null)
Parameters
Type | Name | Description |
---|---|---|
RowsetBase | other | |
System.Func<Doc, 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(Doc, Doc)
Declaration
public override int Compare(Doc docA, Doc docB)
Parameters
Type | Name | Description |
---|---|---|
Doc | docA | |
Doc | docB |
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
DoInsert(Doc)
Declaration
protected override int DoInsert(Doc doc)
Parameters
Type | Name | Description |
---|---|---|
Doc | doc |
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>