Interface ITableSort
- Namespace
- ESRI.ArcGIS.Geodatabase
- Assembly
- ESRI.Server.Geodatabase.dll
Provides access to members that return and modify information to sort a table.
[Guid("2D0F935E-32F5-11D2-A06F-0000F8775BF9")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface ITableSort
Remarks
The Fields property is required. It is a comma-delimited list of the fields to be sorted. When the sort method is called, the first field is sorted, then the second field, and so on. The Table property specifies the table or object class on which the sort is to be performed. Alternatively, the Cursor property may be used to indicate the data to be sorted. If you use the Cursor property, you must also set the Table property to the table referenced by the cursor.
If the SelectionSet property is set, the Table property is set automatically, and the Cursor property remains optional.
The Ascending, CaseSensitive, Compare, QueryFilter, SelectionSet, and SortCharacters properties may also be used to further define how the data is to be sorted.
Once the desired sorting properties have been set, the sort method must be called to order the rows. Either the Rows property or the IDs property can then be used to access the data in sorted order.
A custom class that implements ITableSortCallBack can be used to apply a user defined sorting algorithm instead of the default. The Compare property gives the TableSort object access to an instance of a custom class.
Properties
Ascending[string]
Field sort order.
bool Ascending[string Field] { set; }
Parameters
Fieldstring
Property Value
CaseSensitive[string]
Character fields case sensitive. Default: False.
bool CaseSensitive[string Field] { set; }
Parameters
Fieldstring
Property Value
Compare
Compare call back interface. Specify Null (default) for normal behavior.
ITableSortCallBack Compare { set; }
Property Value
Cursor
The cursor of the data to sort on. Ensure that sorting fields are available. Cancels SelectionSet.
ICursor Cursor { set; }
Property Value
Fields
Comma list of field names to sort on.
string Fields { set; }
Property Value
Remarks
<P>Each table in a database has an ordered collection of fields, there is always at least one field in a table. The ordered collection behaves like a list, so it is possible to access individual fields by a numbered position (or index) in the list.</P> <P>A <STRONG>Fields </STRONG>collection can also exist independently of a table, for example when creating an index on a table you will need to define which fields take part in the index. There are many interfaces which either require or return a <STRONG>Fields </STRONG>collection; these include <STRONG>IClass </STRONG>(therefore also <STRONG>IObjectClass </STRONG>and <STRONG>IFeatureClass</STRONG>), <STRONG>ICursor</STRONG>, <STRONG>IIndex</STRONG>, <STRONG>IFeatureClassDraw</STRONG>, <STRONG>IRowBuffer</STRONG>, <STRONG>ISimpleDataConverter</STRONG>, <STRONG>ITableSort </STRONG>and <STRONG>IValidate</STRONG>.</P>
IDByIndex[int]
A id by its index value.
long IDByIndex[int Index] { get; }
Parameters
Indexint
Property Value
IDs
List of sorted IDs.
IEnumIDs IDs { get; }
Property Value
QueryFilter
The query filter on table or selection set.
IQueryFilter QueryFilter { get; set; }
Property Value
Rows
Cursor of sorted rows.
ICursor Rows { get; }
Property Value
SelectionSet
The selection set as a source of the data to sort on. Cancels Cursor.
ISelectionSet SelectionSet { get; set; }
Property Value
SortCharacters[string]
Number of characters to sort on, for string fields. A null (default) sorts on the whole string.
int SortCharacters[string Field] { set; }
Parameters
Fieldstring
Property Value
Table
The table as a source of the data to sort on.
ITable Table { get; set; }
Property Value
Remarks
<P>A <STRONG>Table </STRONG>object has one or more columns, referred to as fields, and contains an unordered collection of rows. Each row has for each field exactly one value in the data type of the field.</P> <P>A <STRONG>Table </STRONG>is a <STRONG>Dataset </STRONG>and properties such as the name of the table, the persistable name object for the table, and the workspace containing the table, may be obtained via the <STRONG>IDataset </STRONG>interface. In relational terms, a <STRONG>Table </STRONG>object represents an RDBMS table or view. In objected-oriented terms, a Table object represents an ObjectClass or a RelationshipClass in a geodatabase. A <STRONG>Table </STRONG>object hands out <STRONG>Row </STRONG>objects which themselves support application callable methods depending on the type of data stored in the table.</P> <P>The <STRONG>Name </STRONG>property of a <STRONG>Table</STRONG>, accessible via the <STRONG>IDataset </STRONG>interface, returns its fully qualified name. The level of qualification may vary depending on the host DBMS. For example, a table named ‘pipes’, owned by a user named ‘gas’ may be called ‘pipes’ in and Access or File Geodatabase, ‘gas.pipes’ on Oracle and ‘mydb.gas.pipes’ on SQLServer. The <STRONG>ParseTableNamemethod </STRONG>on the <STRONG>ISqlSyntax </STRONG>interface supported by the table’s workspace can be used to split the fully qualified name into its components.</P>
Methods
Sort(ITrackCancel)
Sort rows.
void Sort(ITrackCancel TrackCancel)
Parameters
TrackCancelITrackCancel