Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ FindNodeByKeys()

int System.Data.Index.FindNodeByKeys ( object[] originalKey)
inlineprivate

Definition at line 489 of file Index.cs.

490 {
491 int num = ((originalKey != null) ? originalKey.Length : 0);
492 if (originalKey == null || num == 0 || _indexFields.Length != num)
493 {
494 throw ExceptionBuilder.IndexKeyLength(_indexFields.Length, num);
495 }
496 int num2 = _records.root;
497 if (num2 != 0)
498 {
499 object[] array = new object[originalKey.Length];
500 for (int i = 0; i < originalKey.Length; i++)
501 {
503 }
504 for (num2 = _records.root; num2 != 0; num2 = ((num <= 0) ? _records.Right(num2) : _records.Left(num2)))
505 {
507 if (num == 0)
508 {
509 break;
510 }
511 }
512 }
513 return num2;
514 }
object ConvertValue(object value)
int CompareRecordToKey(int record1, object[] vals)
Definition Index.cs:324
readonly IndexField[] _indexFields
Definition Index.cs:34
IndexTree _records
Definition Index.cs:42
K Key(int nodeId)
Definition RBTree.cs:1407
int Right(int nodeId)
Definition RBTree.cs:1377
int Left(int nodeId)
Definition RBTree.cs:1382
readonly DataColumn Column
Definition IndexField.cs:7

References System.Data.Index._indexFields, System.Data.Index._records, System.array, System.Data.IndexField.Column, System.Data.Index.CompareRecordToKey(), System.Data.DataColumn.ConvertValue(), System.Data.ExceptionBuilder.IndexKeyLength(), System.Data.RBTree< K >.Key(), System.Data.RBTree< K >.Left(), System.Data.RBTree< K >.Right(), and System.Data.RBTree< K >.root.

Referenced by System.Data.Index.FindRecordByKey(), System.Data.Index.FindRecords(), and System.Data.Index.IsKeyInIndex().