Commit Graph
13 Commits
Author SHA1 Message Date
Raja R Harinath a1cae67e2c Mildly rewrite duplicate-inferring logic.
* Index.cs (IndexDuplicateState): Remove.
(_hasDuplicates): Remove.  Replace by ...
(know_have_duplicates, know_no_duplicates): ... these.

svn path=/trunk/mcs/; revision=122242
2008-12-30 14:58:57 +00:00
Raja R Harinath 9d0c64bbfd Avoid allocating empty arrays.
* Index.cs (empty): New empty array constant.
(Reset): Initialize '_array' to 'empty'.
(RebuildIndex): Don't allocate array if it will be empty.
(FindAllIndexes): Use 'empty' instead of 'new int [0]'.

svn path=/trunk/mcs/; revision=119008
2008-11-17 12:30:45 +00:00
Raja R Harinath 7b06496296 Simplify using some invariants
* Index.cs: Remove use of Array and Size properties by taking
advantage of the invariant that _array is never null.
(EnsureArray): Remove.
(Array): Remove.

svn path=/trunk/mcs/; revision=119007
2008-11-17 12:30:27 +00:00
Raja R Harinath 34779ceef2 formatting fixes
svn path=/trunk/mcs/; revision=119005
2008-11-17 12:29:51 +00:00
Gert Driesen c231373769 * DataColumn.cs: Fixed ParamName of ArgumentNullException. Modified
exception message for invalid DateTimeMode value to match MS. Code
formatting.
* DbDataPermissionAttribute.cs: In KeyRestrictionBehavior, reuse
ExceptionHelper.CheckEnumValue.   
* ExceptionHelper.cs: Use same exception message for both 1.0 and 2.0.
* Index.cs: Fixed compiler warnings. Code formatting.
* SqlCommand.cs: Use ExceptionHelper.CheckEnumValue for enum checks.
* OleDbCommand.cs: Use ExceptionHelper.CheckEnumValue for enum checks.
* DBDataPermissionAttributeTest.cs: Improved test for invalid
KeyRestrictionBehavior. Fixed line endings.
* DataColumnTest.cs: No longer derive from deprecated Assertion class.
Code formatting. Added test for DateTimeMode.

svn path=/trunk/mcs/; revision=87866
2007-10-21 13:26:43 +00:00
Senganal T ee861e25e7 2006-07-17 Senganal T <[email protected]>
* Test/System.Data/DataViewTest2.cs :
		- Tests for ToTable overloads
		- Test for Equals method
		- Tests to check for the Sort, RowFilter values when
		DataView is created and when Table is set.
	* Test/System.Data/DataViewTest_IBindingList.cs :
		- Ensure tests do not depend on the order of
		execution.
	* Test/System.Data/DataViewTest_IBindingListView.cs : New
		- Tests for IBindingListView interface methods
	* System.Data.Common/Index.cs :
		- GetAllRows : Added. Returns all the rows in the current
		index.
		- GetDistinctRows :Added. Returns all the distinct rows (based
		in Key Columns) in the index.
	* System.Data.dll.sources:
		- Added to build :
			Test/System.Data/DataViewTest_IBindingListView.cs
	* System.Data/DataView.cs :
		- ToTable : Implemented all the overloads
		- Equals : Implemented 
		- IBindingListView : Implemented the interface


svn path=/trunk/mcs/; revision=62669
2006-07-17 11:58:10 +00:00
Senganal T f8abdf3c60 2006-03-09 Senganal T <[email protected]>
* Test/System.Data/DataRowCollectionTest2.cs :
	* Test/System.Data/DataTableTest2.cs : 
		- Fixed NotWorking tests.
	* System.Data.Common/Index.cs :
		- Update () : Add the new record in the correct position
	* System.Data/DataRow.cs :
		- RejectChanges () :  Add the row to index, if it was in deleted state and
		Update the index if in Modified State.
		- AcceptChanges () : Do not update the Indexes.
		- EndEdit () : Update the indexes even if BeginLoadData has been called
		on the table. Ideally, indexes should not be maintained during DataLoad,
		but this needs to handled in multiple places correctly. For now, just maintain
		the index to ensure correct operation.
	

svn path=/trunk/mcs/; revision=57725
2006-03-09 13:00:43 +00:00
Boris Kirzner e4656fdcfa Rremoved redundant call to RebuildIndex() in constructor.
svn path=/trunk/mcs/; revision=55374
2006-01-11 15:03:30 +00:00
Konstantin Triger 2dd47010c8 fix index updates
svn path=/trunk/mcs/; revision=54453
2005-12-15 14:17:30 +00:00
Boris Kirzner c40ca95e84 Reusing indexes in DataTable.Select() and supporting fixes.
svn path=/trunk/mcs/; revision=50469
2005-09-22 11:52:30 +00:00
Sureshkumar T da0e7ceb01 2005-06-22 Sureshkumar T <[email protected]>
* Index.cs: Remove : length for Array.Copy (a, i+1, a, i, length -
	(i+1)) corrected.


svn path=/trunk/mcs/; revision=46351
2005-06-22 07:49:16 +00:00
Konstantin Triger 03f0186151 fixes for ImportRowTest test case
svn path=/branches/Mainsoft.System.Data/mcs/; revision=44544
2005-05-15 20:51:31 +00:00
Boris Kirzner cc4891c52c Drop of Mainsoft.System.Data
svn path=/branches/Mainsoft.System.Data/mcs/; revision=43607
2005-04-26 17:22:27 +00:00