Examples of ViewColumn


Examples of com.facebook.presto.metadata.ViewDefinition.ViewColumn

                        new ColumnMetadata("a", BIGINT, 0, false)))));

        // valid view referencing table in same schema
        String viewData1 = JsonCodec.jsonCodec(ViewDefinition.class).toJson(
                new ViewDefinition("select a from t1", "tpch", "default", ImmutableList.of(
                        new ViewColumn("a", BIGINT))));
        metadata.createView(SESSION, new QualifiedTableName("tpch", "default", "v1"), viewData1, false);

        // stale view (different column type)
        String viewData2 = JsonCodec.jsonCodec(ViewDefinition.class).toJson(
                new ViewDefinition("select a from t1", "tpch", "default", ImmutableList.of(
                        new ViewColumn("a", VARCHAR))));
        metadata.createView(SESSION, new QualifiedTableName("tpch", "default", "v2"), viewData2, false);

        // view referencing table in different schema from itself and session
        String viewData3 = JsonCodec.jsonCodec(ViewDefinition.class).toJson(
                new ViewDefinition("select a from t4", "c2", "s2", ImmutableList.of(
                        new ViewColumn("a", BIGINT))));
        metadata.createView(SESSION, new QualifiedTableName("c3", "s3", "v3"), viewData3, false);

        analyzer = new Analyzer(
                new ConnectorSession("user", "test", "tpch", "default", UTC_KEY, Locale.ENGLISH, null, null),
                metadata,
View Full Code Here

Examples of com.facebook.presto.metadata.ViewDefinition.ViewColumn

            return true;
        }

        List<Field> fieldList = ImmutableList.copyOf(fields);
        for (int i = 0; i < columns.size(); i++) {
            ViewColumn column = columns.get(i);
            Field field = fieldList.get(i);
            if (!column.getName().equals(field.getName().orNull()) ||
                    !column.getType().equals(field.getType())) {
                return true;
            }
        }

        return false;
View Full Code Here

Examples of com.facebook.presto.metadata.ViewDefinition.ViewColumn

            return true;
        }

        List<Field> fieldList = ImmutableList.copyOf(fields);
        for (int i = 0; i < columns.size(); i++) {
            ViewColumn column = columns.get(i);
            Field field = fieldList.get(i);
            if (!column.getName().equals(field.getName().orNull()) ||
                    !column.getType().equals(field.getType())) {
                return true;
            }
        }

        return false;
View Full Code Here

Examples of com.facebook.presto.metadata.ViewDefinition.ViewColumn

        return new Function<Field, ViewColumn>()
        {
            @Override
            public ViewColumn apply(Field field)
            {
                return new ViewColumn(field.getName().get(), field.getType());
            }
        };
    }
View Full Code Here

Examples of com.infoclinika.mssharing.model.internal.entity.ViewColumn

        return from(columns).transform(new Function<ColumnInfo, ViewColumn>() {
            @Override
            public ViewColumn apply(ColumnInfo input) {
                final ColumnDefinition columnDefinition = columnDefinitionRepo.findOne(input.originalColumn);
                return new ViewColumn(columnDefinition, input.order);
            }
        }).toImmutableSet();
    }
View Full Code Here

Examples of lotus.domino.ViewColumn

    public int findSortColumnIndex(final Vector<ViewColumn> vc) throws NotesException {
      int fc = -1;
      // Find the first sorted column
      int nc = vc.size();
      for (int i = 0; i < nc; i++) {
        ViewColumn c = vc.get(i);
        if (c.isSorted()) {
          return i;
        }
        if (fc < 0 && c.getColumnValuesIndex() != DominoViewEntry.VC_NOT_PRESENT) {
          fc = i;
        }
      }
      // Else, return the first column
      return fc;
View Full Code Here

Examples of lotus.domino.ViewColumn

    protected int findSortColumnIndex(final Vector<ViewColumn> vc) throws NotesException {
      int fc = -1;
      // Find the first sorted column
      int nc = vc.size();
      for (int i = 0; i < nc; i++) {
        ViewColumn c = vc.get(i);
        if (c.isSorted()) {
          return i;
        }
        if (fc < 0 && c.getColumnValuesIndex() != DominoViewEntry.VC_NOT_PRESENT) {
          fc = i;
        }
      }
      // Else, return the first column
      return fc;
View Full Code Here

Examples of lotus.domino.ViewColumn

    super.initNavigator(paramView);

    Vector<ViewColumn> cols = paramView.getColumns();

    for (int i = 0; i < cols.size(); i++) {
      ViewColumn col = cols.get(i);
      org.openntf.domino.Session openNtfSession = null;

      if (col.isConstant()) {
        if (openNtfSession == null) {
          Session sess = paramView.getParent().getParent();
          if (sess instanceof org.openntf.domino.Session) {
            openNtfSession = (org.openntf.domino.Session) sess;
          } else {
            openNtfSession = Factory.fromLotus(sess, org.openntf.domino.Session.SCHEMA, null);
          }
        }
        openNtfSession.evaluate(col.getFormula());
      }
    }
  }
View Full Code Here

Examples of org.openntf.domino.ViewColumn

      marktime = System.nanoTime();
      timelog("Beginning view build...");
      View byLength = db.getView("byLength");
      View btitles = db.createView("BTitles", "@Begins(Title; \"B\")", byLength);
      //      View btitles = db.createView("BTitles", "@Begins(Title; \"B\")");
      ViewColumn length = btitles.createColumn(1, "Title", "Title");
      length.setSorted(true);
      timelog("View defined.");
      btitles.refresh();
      timelog("Completed view build.");
      ViewEntryCollection vec = btitles.getAllEntries();
      int count = vec.getCount();
View Full Code Here

Examples of org.openntf.domino.ViewColumn

        column.setFormula(DB_KEY_NAME);
        column.setTitle("ID");
        column.setSorted(true);
        column.setSortDescending(false);
      }
      ViewColumn titleColumn = dbView.createColumn();
      titleColumn.setFormula(DB_TITLE_NAME);
      titleColumn.setTitle("TITLE");

    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.