Build "columns as" values for the table columns with the specified
columns as the specified value

@param columns
columns to include as value
@param value
"columns as" value for specified columns
@return "columns as" values
@since 2.0.0
187713
public String[] buildColumnsAs(List<TColumn> columns, String value) {

		String[] columnsArray = buildColumnsArray(columns);

		return buildColumnsAs(columnsArray, value);
	}
762143
public void setColumns(String columns) throws PageException {
	this.columns = ListUtil.toStringArray(ListUtil.listToArrayRemoveEmpty(columns, ","));
    }
1105776
def distinct_values_for_column(column)  #:nodoc:
      column.model.select("distinct #{column.name}").order("#{column.name} asc").collect do|ar|
        ar[column.name]
      end.reject(&:blank?).map { |i| [i, i] }
    end
859926
public List<NumericColumn<?>> numericColumns(int... columnIndices) {
        List<NumericColumn<?>> cols = new ArrayList<>();
        for (int i : columnIndices) {
            cols.add(numberColumn(i));
        }

        return cols;
    }
223847
static
	private <E> List<E> toJavaList(List<E> values, int rows, int columns){
		List<E> result = new ArrayList<>(values.size());

		for(int i = 0; i < values.size(); i++){
			int row = i / columns;
			int column = i % columns;

			E value = values.get((column * rows) + row);

			result.add(value);
		}

		return result;
	}
147631
public int[] columnMapping( String[] features ) {
    int[] map = new int[_colNames.length];
    for( int i=0; i<_colNames.length; i++ ) {
      map[i] = -1;              // Assume it is missing
      for( int j=0; j<features.length; j++ ) {
        if( _colNames[i].equals(features[j]) ) {
          if( map[i] != -1 ) throw new IllegalArgumentException("duplicate feature "+_colNames[i]);
          map[i] = j;
        }
      }
      if( map[i] == -1 ) Log.warn(Sys.SCORM,"Model feature "+_colNames[i]+" not in the provided feature list from the data");
    }
    return map;
  }
495877
protected void appendColumns (Iterable<String> columns, StringBuilder buf) {
        int ii = 0;
        for (String column : columns) {
            if (ii++ > 0) {
                buf.append(", ");
            }
            buf.append(columnSQL(column));
        }
    }
232566
public static String buildSqlINSERT(String tableName, String[] columnNames, Object[] values) {
        if (columnNames.length != values.length) {
            throw new IllegalArgumentException(
                    "Number of columns must be equal to number of values.");
        }
        final String SQL_TEMPLATE = "INSERT INTO {0} ({1}) VALUES ({2})";
        final String SQL_PART_COLUMNS = StringUtils.join(columnNames, ',');
        final StringBuilder SQL_PART_VALUES = new StringBuilder();
        for (int i = 0; i < values.length; i++) {
            if (values[i] instanceof ParamExpression) {
                SQL_PART_VALUES.append(((ParamExpression) values[i]).getExpression());
            } else {
                SQL_PART_VALUES.append('?');
            }
            if (i < values.length - 1) {
                SQL_PART_VALUES.append(',');
            }
        }
        return MessageFormat.format(SQL_TEMPLATE, tableName, SQL_PART_COLUMNS, SQL_PART_VALUES);
    }
325150
public String buildWhereLike(String field, ColumnValue value) {
		String where;
		if (value != null) {
			if (value.getTolerance() != null) {
				throw new GeoPackageException(
						"Field value tolerance not supported for LIKE query, Field: "
								+ field + ", Value: " + ", Tolerance: "
								+ value.getTolerance());
			}
			where = buildWhereLike(field, value.getValue());
		} else {
			where = buildWhere(field, null, null);
		}
		return where;
	}
1040869
public TResult queryForLike(String fieldName, ColumnValue value) {
		String where = buildWhereLike(fieldName, value);
		String[] whereArgs = buildWhereArgs(value);
		TResult result = userDb.query(getTableName(), table.getColumnNames(),
				where, whereArgs, null, null, null);
		prepareResult(result);
		return result;
	}
1064290
private List<String[]> buildRows(List<ColumnTypeDataPair> columns) throws BindException
  {
    List<String[]> rows = new ArrayList<>();

    int numColumns = columns.size();
    // columns should have binds
    if (columns.get(0).data.isEmpty())
    {
      throw new BindException("No binds found in first column", BindException.Type.SERIALIZATION);
    }

    int numRows = columns.get(0).data.size();
    // every column should have the same number of binds
    for (int i = 0; i < numColumns; i++)
    {
      int iNumRows = columns.get(i).data.size();
      if (columns.get(i).data.size() != numRows)
      {
        throw new BindException(
            String.format("Column %d has a different number of binds (%d) than column 1 (%d)", i, iNumRows, numRows), BindException.Type.SERIALIZATION);
      }
    }

    for (int rowIdx = 0; rowIdx < numRows; rowIdx++)
    {
      String[] row = new String[numColumns];
      for (int colIdx = 0; colIdx < numColumns; colIdx++)
      {
        row[colIdx] = columns.get(colIdx).data.get(rowIdx);
      }
      rows.add(row);
    }

    return rows;
  }
549441
public void setColumns(java.util.Collection<Column> columns) {
        if (columns == null) {
            this.columns = null;
            return;
        }

        this.columns = new java.util.ArrayList<Column>(columns);
    }
518502
public static ColumnValue mov(String column, Serializable value) {
        return new ColumnValue(column, MOV, value);
    }
1324164
public void addColumnEqualTo(String column, Object value)
    {
    	// PAW
//		SelectionCriteria c = ValueCriteria.buildEqualToCriteria(column, value, getAlias());
		SelectionCriteria c = ValueCriteria.buildEqualToCriteria(column, value, getUserAlias(column));
        c.setTranslateAttribute(false);
        addSelectionCriteria(c);
    }
42857
public static ColumnValue inc(String column, Serializable value) {
        return new ColumnValue(column, INC, value);
    }
355377
public function mapColumnsWithValues($columns, $values)
    {
        // If $values is null, then use $columns to build it up
        if (is_null($values)) {

            if ($this->isAssoc($columns)) {

                // Incoming is associative array, split it up in two
                $values = array_values($columns);
                $columns = array_keys($columns);

            } else {

                // Create an array of '?' to match number of columns
                $max = count($columns);
                for ($i = 0; $i < $max; $i++) {
                    $values[] = '?';
                }
            }
        }

        return [$columns, $values];
    }
395669
public static List<Column> toColumn(List<String> columns) {
        List<Column> ret = new ArrayList<>();
        for (String s : columns)
            ret.add(col(s));
        return ret;
    }