/* =============================================
This returns all the columns in the table
Columns with a default value will have the value
The rest are just null
185671
protected function getTableDefaults($tableName)
  {
    if (!isset($this->tableDefaults[$tableName]))
    {
      $this->loadTable($tableName);
    }
    return $this->tableDefaults[$tableName];
  }
636941
public function getColumn() : ?string 
    {
        if ( ! $this->hasColumn()) {
            $this->setColumn($this->getDefaultColumn());
        }
        return $this->column;
    }
593181
function _getColumns(matrix) {
  var cols = [];
  for (var i=0; i<matrix.size.columns; i++) {
    cols.push([]);
    for (var j=0; j<matrix.size.rows; j++)
      cols[i].push(matrix.values[i + j * matrix.size.columns]);
  }
  return cols;
}
522887
function getDefault() {
  const type = NodeType.DefaultType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  const content = joinValues(pos, token.defaultEnd);

  pos = token.defaultEnd + 1;

  return newNode(type, content, line, column);
}
551776
protected function getDefaultTable($real=false) {
		if(count($this->tables) === 1) {
			if($real)
				return array_values($this->tables)[0];
			else
				return array_keys($this->tables)[0];
		}
		else
			return null;
	}
936844
function getCols(table) {
      var panel = tiaEJ.search.parentPanel(table);
      var columns = panel.getVisibleColumns();
      return columns;
    }
1191323
function (columns) {
        var i, j, k,
            totalCol = 0,
            flag = [];

        for (i = 0; i < columns[0].length; i++) {
            totalCol += columns[0][i].colspan || 1;
        }

        for (i = 0; i < columns.length; i++) {
            flag[i] = [];
            for (j = 0; j < totalCol; j++) {
                flag[i][j] = false;
            }
        }

        for (i = 0; i < columns.length; i++) {
            for (j = 0; j < columns[i].length; j++) {
                var r = columns[i][j],
                    rowspan = r.rowspan || 1,
                    colspan = r.colspan || 1,
                    index = $.inArray(false, flag[i]);

                if (colspan === 1) {
                    r.fieldIndex = index;
                    // when field is undefined, use index instead
                    if (typeof r.field === 'undefined') {
                        r.field = index;
                    }
                }

                for (k = 0; k < rowspan; k++) {
                    flag[i + k][index] = true;
                }
                for (k = 0; k < colspan; k++) {
                    flag[i][index + k] = true;
                }
            }
        }
    }
435684
public function getColumnQuery() {
        // prepare column types
        $type_val = $this->getTypeVal();
        // build query
        $query = $this->db->quotekey($this->name).' '.$type_val.' '.
            $this->getNullable();
        // unify default for booleans
        if (preg_match('/bool/i', $type_val) && $this->default!==null)
            $this->default = (int) $this->default;
        // default value
        if ($this->default !== false) {
            $def_cmds = array(
                'sqlite2?|mysql|pgsql' => 'DEFAULT',
                'mssql|sybase|dblib|odbc|sqlsrv' => 'constraint DF_'.$this->table->name.'_'.$this->name.' DEFAULT',
                'ibm' => 'WITH DEFAULT',
            );
            $def_cmd = $this->findQuery($def_cmds).' '.$this->getDefault();
            $query .= ' '.$def_cmd;
        }
        if (!empty($this->after) && $this->table instanceof TableModifier) {
            // `after` feature only works for mysql
            if (preg_match('/mysql/', $this->db->driver())) {
                $after_cmd = 'AFTER '.$this->db->quotekey($this->after);
                $query .= ' '.$after_cmd;
            }
        }
        return $query;
    }
828413
protected function getInsertColumnList()
    {
        $columns             = [];
        $versionPropertyName = $this->class->isVersioned()
            ? $this->class->versionProperty->getName()
            : null;

        foreach ($this->class->getDeclaredPropertiesIterator() as $name => $property) {
            /*if (isset($this->class->embeddedClasses[$name])) {
                continue;
            }*/

            switch (true) {
                case $property instanceof VersionFieldMetadata:
                    // Do nothing
                    break;

                case $property instanceof LocalColumnMetadata:
                    if (($property instanceof FieldMetadata
                            && (
                                ! $property->hasValueGenerator()
                                || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY
                            )
                        )
                        || $this->class->identifier[0] !== $name
                    ) {
                        $columnName = $property->getColumnName();

                        $columns[] = $columnName;

                        $this->columns[$columnName] = $property;
                    }

                    break;

                case $property instanceof AssociationMetadata:
                    if ($property->isOwningSide() && $property instanceof ToOneAssociationMetadata) {
                        $targetClass = $this->em->getClassMetadata($property->getTargetEntity());

                        foreach ($property->getJoinColumns() as $joinColumn) {
                            /** @var JoinColumnMetadata $joinColumn */
                            $columnName           = $joinColumn->getColumnName();
                            $referencedColumnName = $joinColumn->getReferencedColumnName();

                            if (! $joinColumn->getType()) {
                                $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
                            }

                            $columns[] = $columnName;

                            $this->columns[$columnName] = $joinColumn;
                        }
                    }

                    break;
            }
        }

        return $columns;
    }
1237985
@Override
    public String[] getColumns() {
        if (metaData != null && columns == null) {
            final List<ColumnMetaData> cmds = metaData.getColumnsNames();

            columns = new String[cmds.size()];
            for (int i = 0; i < cmds.size(); i++) {
                columns[i] = cmds.get(i).getColName();
            }
        }

        return columns;
    }
128748
public String getNullValueSelect()
    {
        String ret = null;
        if (!this.types.isEmpty())  {
            ret = Context.getDbType().getNullValueSelect(this.types.iterator().next());
        }
        return ret;
    }
909776
function(column) {
        if(YAHOO.lang.isString(column)) {
            var allColumns = this.flat;
            for(var i=allColumns.length-1; i>-1; i--) {
                if(allColumns[i]._sId === column) {
                    return allColumns[i];
                }
            }
        }
        return null;
    }
704186
function getAll()
    {
        foreach ($this->__columns as $k=>$v) {
            $a[$k] = $v;
        }
        return $a;
    }
304160
function (defaultValue) {
			var sReturn;

			switch (defaultValue) {
				case null:
				case undefined:
					sReturn = '';
					break;
				case '':
					sReturn = 'empty string';
					break;
				default:
					sReturn = defaultValue;
			}

			return Array.isArray(sReturn) ? sReturn.join(', ') : sReturn;
		}
84613
function buildValueColumns(item, tableStructures, activeCombinations) {
  // The tableStructures are from the raw data files, one per activeCombinations.
  return tableStructures.map(function(tableStructure, index) {
    var columnNames = tableStructure.getColumnNames();
    // Check that the data is not blank, and that the column names are ["Time", "Value", "REGION" (or equivalent), "Description"]
    if (columnNames.length === 0) {
      throwLoadError(item, "GetGenericData");
    } else if (
      !arraysAreEqual(columnNames, [
        "Time",
        "Value",
        item.regionConcept,
        "Description"
      ])
    ) {
      throwDataColumnsError(item, columnNames);
    }
    var absCodes = activeCombinations[index];
    // Pull out and clone the 'Value' column, and rename it to match all the codes except the region type, eg. Persons 0-4 years.
    var valueColumn = tableStructure.columns[columnNames.indexOf("Value")];
    var valueName = absCodes
      .filter(function(absCode) {
        return absCode.concept.id !== item.regionTypeConcept;
      })
      .map(function(absCode) {
        return absCode.name.trim();
      })
      .reverse() // It would be nice to specify a preferred order of codes here; reverse because "Persons 0-4 years" sounds better than "0-4 years Persons".
      .join(" ");
    valueColumn = new TableColumn(
      valueName,
      valueColumn.values,
      valueColumn.options
    );
    return valueColumn;
  });
}
394046
private function getColumns()
    {
        $dimensions = $this->getApplication()->getTerminalDimensions();
        if (is_array($dimensions) && count($dimensions) > self::DIMENSION_WIDTH) {
            return $dimensions[self::DIMENSION_WIDTH];
        } else {
            return self::DEFAULT_WIDTH;
        }
    }
444205
final String getColumnDefaultValue(int index) {
        if (m_extraMetadata != null) {
            return m_extraMetadata.originalColumnInfos[index].defaultValue;
        }
        return null;
    }