Esempio n. 1
0
  void addTableColumns(Expression expression, HashSet exclude) {

    HsqlArrayList list = new HsqlArrayList();
    Table table = getTable();
    int count = table.getColumnCount();

    for (int i = 0; i < count; i++) {
      ColumnSchema column = table.getColumn(i);
      String columnName =
          columnAliases == null ? column.getName().name : (String) columnAliases.get(i);

      if (exclude != null && exclude.contains(columnName)) {
        continue;
      }

      Expression e = new ExpressionColumn(this, column, i);

      list.add(e);
    }

    Expression[] nodes = new Expression[list.size()];

    list.toArray(nodes);

    expression.nodes = nodes;
  }
Esempio n. 2
0
  public ColumnSchema duplicate() {

    ColumnSchema copy =
        new ColumnSchema(columnName, dataType, isNullable(), isPrimaryKey, defaultExpression);

    copy.setGeneratingExpression(generatingExpression);
    copy.setIdentity(sequence);

    return copy;
  }
Esempio n. 3
0
  /** Add all columns to a list of expressions */
  int addTableColumns(HsqlArrayList expList, int position, HashSet exclude) {

    Table table = getTable();
    int count = table.getColumnCount();

    for (int i = 0; i < count; i++) {
      ColumnSchema column = table.getColumn(i);
      String columnName =
          columnAliases == null ? column.getName().name : (String) columnAliases.get(i);

      if (exclude != null && exclude.contains(columnName)) {
        continue;
      }

      Expression e = new ExpressionColumn(this, column, i);

      expList.add(position++, e);
    }

    return position;
  }