/// <summary> /// Returns a new cursor for the table, constructed to the given /// specifications. /// </summary> /// <remarks> /// Returns a new cursor for the table, constructed to the given /// specifications. /// </remarks> /// <exception cref="System.IO.IOException"></exception> public virtual Cursor ToCursor() { Cursor cursor = null; if (_index == null) { cursor = Cursor.CreateCursor(_table); } else { cursor = Cursor.CreateIndexCursor(_table, _index, _startRow, _startRowInclusive, _endRow, _endRowInclusive); } cursor.SetColumnMatcher(_columnMatcher); if (_savepoint == null) { if (!_beforeFirst) { cursor.AfterLast(); } } else { cursor.RestoreSavepoint(_savepoint); } return(cursor); }