Append an {@code IN} operator for the column and values.

@return column IN (values[0],...,values[n])
@since 2.6.0
548274
public static StringBuilder in(String column, long[] values, StringBuilder s) {
		return in(column, values, null, s);
	}
664288
protected List appendListOfColumns(String[] columns, StringBuffer stmt)
    {
        ArrayList columnList = new ArrayList();

        for (int i = 0; i < columns.length; i++)
        {
            if (i > 0)
            {
                stmt.append(",");
            }
            stmt.append(columns[i]);
            columnList.add(columns[i]);
        }
        return columnList;

    }
28682
public Expression<Byte> in(Byte[] value) {
		String listNumberString = "";
		Boolean firstNumber = true;
		for (Byte v : value) {
			if (firstNumber) {
				listNumberString = listNumberString.concat("('").concat(v.toString()).concat("'");
				firstNumber = false;
			} else {
				listNumberString = listNumberString.concat(", '").concat(v.toString()).concat("'");
			}
		}
		listNumberString = listNumberString.concat(")");
		return new Expression<Byte>(this, Operation.in, listNumberString);
	}
546142
public Matrix insert(Matrix that) {
        return insert(that, 0, 0, 0, 0, that.rows(), that.columns());
    }
795202
public static Query in(String field, Object... values) {
        return new Query().in(field, values);
    }
201849
public String[] buildColumnsAs(String[] columns, String[] values) {

		Map<String, String> columnsMap = new HashMap<>();
		for (int i = 0; i < columns.length; i++) {
			String column = columns[i];
			String value = values[i];
			columnsMap.put(column, value);
		}

		return buildColumnsAs(columnsMap);
	}
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;
  }
69136
private String[] buildColumnsArray(List<TColumn> columns) {
		String[] columnsArray = new String[columns.size()];
		for (int i = 0; i < columns.size(); i++) {
			TColumn column = columns.get(i);
			columnsArray[i] = column.getName();
		}
		return columnsArray;
	}
716778
private boolean appendInClause(StringBuilder queryBuilder, CQLTranslator translator, List<Object> value,
        Class fieldClazz, String columnName, boolean isPresent) {
        isPresent = appendIn(queryBuilder, translator, columnName);
        queryBuilder.append("(");
        for (Object objectvalue : value) {
            translator.appendValue(queryBuilder, fieldClazz, objectvalue, isPresent, false);
            queryBuilder.append(", ");
        }

        queryBuilder.deleteCharAt(queryBuilder.lastIndexOf(", "));
        queryBuilder.append(") ");

        queryBuilder.append(" AND ");
        return isPresent;
    }
1052436
public Expression<Boolean> in(Boolean[] value) {
		String listBooleanString = "";
		Boolean firstNumber = true;
		for (Boolean v : value) {
			if (firstNumber) {
				listBooleanString = listBooleanString.concat("(").concat(v.toString());
				firstNumber = false;
			} else {
				listBooleanString = listBooleanString.concat(", ").concat(v.toString());
			}
		}
		listBooleanString = listBooleanString.concat(")");
		return new Expression<Boolean>(this, Operation.in, listBooleanString);
	}
780143
public Expression<Calendar> in(Calendar[] value) {
		String valueString = "";
		Boolean firstCalendar = true;
		for (Calendar v : value) {
			if (firstCalendar) {
				valueString = valueString.concat("('").concat(getCalendarAsString(v)).concat("'");
				firstCalendar = false;
			} else {
				valueString = valueString.concat(", '").concat(getCalendarAsString(v)).concat("'");
			}
		}

		valueString = valueString.concat(")");
		return new Expression<Calendar>(this, Operation.in, valueString);
	}
1304392
@Override
    public String generateClause() {
        StringBuilder wherePart = new StringBuilder();
        wherePart.append(referenceIndices.generateColumnReference(columnSpec));
        if (not) {
            wherePart.append(" NOT");
        }
        wherePart.append(" IN (");
        for (int k = 0; k < elements.length; k++) {
            Object val = elements[k];
            wherePart.append(SqlGeneratorUtil.prepareValue(val));
            if (k + 1 < elements.length) {
                if ((k + 1) % 1000 == 0) {
                    wherePart.append(") OR ");
                    wherePart.append(referenceIndices.generateColumnReference(columnSpec));
                    wherePart.append(" IN (");
                } else {
                    wherePart.append(',');
                }
            }
        }
        wherePart.append(')');
        
        return wherePart.toString();
    }
490844
Index createIndexForColumns(int[] columns) {

        HsqlName indexName = database.nameManager.newAutoName("IDX_T",
            getSchemaName(), getName(), SchemaObject.INDEX);

        try {
            Index index = createAndAddIndexStructure(indexName, columns, null,
                null, false, false, false, false);

            return index;
        } catch (Throwable t) {
            return null;
        }
    }
1185610
private Map<String, Integer> createMapOfColumnIndex(String[] columns)
    {
        int i = 0;
        Map<String, Integer> map = new HashMap<String, Integer>();
        for (String column : columns)
        {
            map.put(column, i++);
        }
        return map;
    }
1076092
public TerminalSize withColumns(int columns) {
        if(this.columns == columns) {
            return this;
        }
        if(columns == 0 && this.rows == 0) {
            return ZERO;
        }
        return new TerminalSize(columns, this.rows);
    }
28538
public Object[] valuesForColumns(T bo, String... columns) {
        Map<String, ColAttrMapping> columnAttributeMappings = getColumnAttributeMappings();
        Object[] result = new Object[columns.length];
        for (int i = 0; i < columns.length; i++) {
            ColAttrMapping colAttrMapping = columnAttributeMappings.get(columns[i]);
            try {
                result[i] = colAttrMapping != null ? colAttrMapping.extractAttrValue(bo) : null;
            } catch (Exception e) {
                throw e instanceof RuntimeException ? (RuntimeException) e
                        : new RuntimeException(e);
            }
        }
        return result;
    }
197511
def insert(table, columns, values)
      puts "attempting to insert values into #{table}..."
        begin
          nvalues = []
          values.each do |v|
            if v.is_a? String
              nvalues << "\"" + v + "\"" 
            else
              nvalues << v
            end
          end
          tt = @dbr.prepare("INSERT INTO #{table}(" + columns.join(", ") + ") VALUES(" + nvalues.join(", ") + ");")
          ee = tt.execute
          puts "values correctly added!".green
        rescue
          puts "error while inserting values".red
        end
    end