2 writes to primaryKey
System.Data (2)
fx\src\data\System\Data\DataTable.cs (2)
1580
primaryKey
= null;
1604
primaryKey
= key;
38 references to primaryKey
System.Data (38)
fx\src\data\System\Data\ConstraintCollection.cs (2)
113
if (Table.
primaryKey
!= null) {
690
if (table.
primaryKey
!= null) {
fx\src\data\System\Data\DataColumnCollection.cs (2)
442
if (table.
primaryKey
!= null && table.
primaryKey
.Key.ContainsColumn(column)) {
fx\src\data\System\Data\DataTable.cs (23)
1531
UniqueConstraint primayKeyConstraint =
primaryKey
;
1533
Debug.Assert(2 <=
primaryKey
.ConstraintIndex.RefCount, "bad primaryKey index RefCount");
1570
if (key ==
primaryKey
|| (key != null && key.Equals(
primaryKey
)))
1579
UniqueConstraint oldKey =
primaryKey
;
1606
Debug.Assert(Constraints.FindConstraint(
primaryKey
) ==
primaryKey
, "PrimaryKey is not in ConstraintCollection");
1609
if (
primaryKey
!= null) {
1625
return(
primaryKey
!= null);
2786
if (
primaryKey
== null) throw ExceptionBuilder.TableMissingPrimaryKey();
2791
return FindRow(
primaryKey
.Key, values);
2796
return FindRow(
primaryKey
.Key, value);
4145
if (
primaryKey
!= null) {
4146
loadIndex =
primaryKey
.Key.GetSortIndex(DataViewRowState.OriginalRows);
4261
if (this.
primaryKey
!= null) {
4264
loadIndexwithCurrentDeleted = this.
primaryKey
.Key.GetSortIndex(DataViewRowState.CurrentRows |DataViewRowState.Deleted);
4274
loadIndexwithOriginalAdded = this.
primaryKey
.Key.GetSortIndex(DataViewRowState.OriginalRows |DataViewRowState.Added);
4301
if (this.
primaryKey
!= null) {
4302
index = this.
primaryKey
.Key.GetSortIndex(DataViewRowState.OriginalRows);
4495
if (this.
primaryKey
!= null) { // I do check above for PK, but in case if someone else gives me some index unrelated to PK
4496
primaryKeyIndex = new int[this.
primaryKey
.ColumnsReference.Length];
4497
for(int i = 0; i < this.
primaryKey
.ColumnsReference.Length; i++) {
4498
primaryKeyIndex[i] = this.
primaryKey
.ColumnsReference[i].Ordinal;
fx\src\data\System\Data\Merger.cs (8)
180
if(! wasEmpty && dst.
primaryKey
!= null) {
183
ndxSearch = dst.
primaryKey
.Key.GetSortIndex(DataViewRowState.OriginalRows | DataViewRowState.Added );
233
if(dst.
primaryKey
!= null) {
244
ndxSearch = new Index(dst, dst.
primaryKey
.Key.GetIndexDesc(), DataViewRowState.OriginalRows | DataViewRowState.Added, (IFilter)null);
542
if (src.
primaryKey
!= null)
543
return src.
primaryKey
.Key;
546
if (dst.
primaryKey
!= null) {
547
DataColumn[] dstColumns = dst.
primaryKey
.Key.ColumnsReference;
fx\src\data\System\Data\UniqueConstraint.cs (3)
180
if (this.Equals(constraints.Table.
primaryKey
)) {
181
Debug.Assert(constraints.Table.
primaryKey
== this, "If the primary key and this are 'Equal', they should also be '=='");
346
return(this == Table.
primaryKey
);