Returns column index of "_id" column, or -1 if not found.
@hide
553133
public static int findRowIdColumnIndex(String[] columnNames) {
        int length = columnNames.length;
        for (int i = 0; i < length; i++) {
            if (columnNames[i].equals("_id")) {
                return i;
            }
        }
        return -1;
    }
211512
function (id) {
            var carousel = this,
                n = carousel.get("numItems"),
                i = 0,
                items = carousel._itemsTable.items,
                item;

            while (i < n) {
                item = items[i] || {};
                if(item.id == id) {
                    return i;
                }
                i++;
            }

            return -1;
        }
561934
private String getValueForId(String id) {
        for (int k = 0; k < fieldset.getWidgetCount(); k++) {
            Widget widget = fieldset.getWidget(k);
            if (id.equals(widget.getElement().getAttribute("id")))
                return widget.getElement().getAttribute("value");
        }
        return null;
    }
1357480
public IndexInfo getColumnToBeIndexed(String columnName)
    {
        IndexInfo idxInfo = new IndexInfo(columnName);
        if (columnToBeIndexed.contains(idxInfo))
        {
            int index = columnToBeIndexed.indexOf(idxInfo);
            return getColumnsToBeIndexed().get(index);
        }
        return idxInfo;
    }
818103
function indexById(array, id) {
    if (!array) return -1;
    return smartIndexOf(array, function (obj) {
        return obj.id === id;
    });
}
119868
public function Columns($id = null)
    {
        $singleton = $this->dataRecord->getDataSingleton();
        $columns   = $singleton->summaryFields();
        $list      = ArrayList::create();
        $result    = null;

        if ($id) {
            $result = $this->queryList()->byId($id);
        }

        foreach ($columns as $name => $title) {
            // Check for unwanted parameters
            if (preg_match('/[()]/', $name)) {
                throw new RegistryException(_t(
                    'SilverStripe\\Registry\\RegistryPageController.UNWANTEDCOLUMNPARAMETERS',
                    "Columns do not accept parameters"
                ));
            }

            // Get dot deliniated properties
            $properties = explode('.', $name);

            // Increment properties for value
            $context = $result;
            foreach ($properties as $property) {
                if ($context instanceof ViewableData) {
                    $context = $context->obj($property);
                }
            }

            // Check for link
            $link = null;
            $useLink = $singleton->config()->get('use_link');
            if ($useLink !== false) {
                if ($result && $result->hasMethod('Link')) {
                    $link = $result->Link();
                }
            }

            // Format column
            $list->push(ArrayData::create([
                'Name' => $name,
                'Title' => $title,
                'Link' => $link,
                'Value' => $context,
                'CanSort' => $this->canSortBy($name)
            ]));
        }
        return $list;
    }
310899
public function findIdColumn($id, $column) {
		if (!empty($column)) $this->driver->field($column);
		$tableAlias = $this->driver->alias?$this->driver->alias.'.':'';
		return $this->driver->where($tableAlias.$this->id.'=?', [$id])
            ->fetchColumn();
	}
1131861
public static function get_id_column(string $column, string $table): ?string
  {
    if (
      ($db = self::_get_db()) &&
      ($full_table = $db->tfn($table)) &&
      ($databases_obj = self::_get_databases())
    ){
      [$database, $table] = explode('.', $full_table);
      return $databases_obj->column_id($column, $table, $database, self::$db->host);
    }
    return false;
  }
1028259
int getElementID(int column) {
        if (cells[column] == null) return NULL;
        else if (Cell.class.isInstance(cells[column])) return CELL;
        else if (Table.class.isInstance(cells[column])) return TABLE;
        
        return -1;
    }
1153805
def find(self, id, columns=None):
        
        if not columns:
            columns = ['*']

        return self.where('id', '=', id).first(1, columns)
274545
@Override
	public Class<?> getColumnClass(int columnIndex) {
		switch (this.columns[columnIndex]) {
		case HREF_ID:		return Integer.class;
		case TYPE_FLAG:		return ImageIcon.class;
		case METHOD:		return String.class;
		case URL:			return String.class;
		case CODE:			return Integer.class;
		case REASON:		return String.class;
		case RTT:			return Integer.class;
		case SIZE:			return Integer.class;
		case SESSION_ID:	return Long.class;
		case ALERT_FLAG:	return ImageIcon.class;
		case TAGS:			return String.class;
		default:			return null;
		}
	}
110226
public int getItemPosition(int id) {
        for(int index = getCount()-1; index >= 0; index--) {
            TwinTextItem item = getItem(index);
            if(item.getId() == id)
                return index;
        }
        return -1;
    }
778321
public function col_id($col, $table=false){
    
    if ( substr_count($col, ".") === 2 ){
      return $col;
    }
    else if ( substr_count($col, ".") === 1 ){
      if ( $table ){
        return $this->table_id($table).'.'.$this->simple_name($col);
      }
      else{
        return $this->simple_name($this->client_db).'.'.$col;
      }
    }
    else if ( $table ){
      return $this->table_id($table).'.'.$col;
    }
  }
640547
function(column){
			var index = -1;
			var j = 0;
			for(var i=0;i < this.gridCompColumnArr.length;i++){
				if(this.gridCompColumnArr[i] == column){
					if(!($('#' + this.options.id + '_header').find('th').eq(i).css('display') == 'none')){
						index = j;
					}
					break;
				}
				if(!($('#' + this.options.id + '_header').find('th').eq(i).css('display') == 'none')){
					j++;
				}
			}
			return index;
		}
206479
public int getColumnIndex(String name) {

        int i = findColumn(name);

        if (i == -1) {
            throw Error.error(ErrorCode.X_42501, name);
        }

        return i;
    }
78804
public function findOrFail($id, $columns = ['*'])
    {
        if (Uuid::validate($id)) {
            return $this->findOrFailByUuid($id, $columns);
        } else {
            return parent::findOrFail($id, $columns);
        }
    }
274055
protected function _getIdColumnName()
        {
            if (!is_null($this->_instance_id_column)) {
                return $this->_instance_id_column;
            }

            if (isset(self::$_config[$this->_connection_name]['id_column_overrides'][$this->_table_name])) {
                return self::$_config[$this->_connection_name]['id_column_overrides'][$this->_table_name];
            }

            return self::$_config[$this->_connection_name]['id_column'];
        }