Examples of IndexColumn


Examples of com.alvazan.orm.api.z8spi.action.IndexColumn

  @Override
  public com.alvazan.orm.api.z8spi.iter.AbstractCursor.Holder<IndexColumn> previousImpl() {
    loadCache(true);
    if (cachedRows == null || !cachedRows.hasPrevious())
      return null;
    IndexColumn indexCol = MongoDbUtil.convertToIndexCol(cachedRows.previous());
    return new Holder<IndexColumn>(indexCol);
  }
View Full Code Here

Examples of com.alvazan.orm.api.z8spi.action.IndexColumn

  }

  public static IndexColumn convertToIndexCol(DBObject col) {
    Object indValue = col.get("k");
    Object pk = col.get("v");
    IndexColumn c = new IndexColumn();
    // c.setColumnName(columnName); Will we ever need this now?
    if (pk != null) {
      c.setPrimaryKey((byte[]) pk);
    }
    if (indValue != null) {
      c.setIndexedValue(StandardConverters.convertToBytes(indValue));
    }

    c.setValue(null);
    return c;
  }
View Full Code Here

Examples of com.alvazan.orm.api.z8spi.action.IndexColumn

        batchListener.afterFetchingNextBatch(cursor.count());

      List<IndexColumn> finalRes = new ArrayList<IndexColumn>();
      while (cursor.hasNext()) {
        DBObject mdbrow = cursor.next();
        IndexColumn indexCol = MongoDbUtil.convertToIndexCol(mdbrow);
        finalRes.add(indexCol);
      }
      cachedRows = finalRes.listIterator();
      needToGetBatch = false;
      if(reverse) {
View Full Code Here

Examples of com.foundationdb.ais.model.IndexColumn

                return indexColumnIt.next();
            }

            @Override
            public Row next() {
                IndexColumn indexColumn = advance();
                if(indexColumn == null) {
                    return null;
                }
                return new ValuesRow(rowType,
                        null,
                         indexIt.getTable().getName().getSchemaName(),
                         indexIt.getTable().getName().getTableName(),
                         indexColumn.getIndex().getIndexName().getName(),
                         null,
                         indexColumn.getColumn().getTable().getName().getSchemaName(),
                         indexColumn.getColumn().getTable().getName().getTableName(),
                         indexColumn.getColumn().getName(),
                         indexColumn.getPosition().longValue(),
                         boolResult(indexColumn.isAscending()),
                         ++rowCounter /*hidden pk*/);
            }
View Full Code Here

Examples of nexj.core.meta.persistence.sql.IndexColumn

      assertEquals(1, table.getIndex(0).getIndexColumnCount());
      table.setType(Table.MANAGED); // comes in as Table.EXTERNAL from DB

      Index aspect = new Index("aspect", Index.ASPECT, null);

      aspect.addIndexColumn(new IndexColumn(table.getColumn(1), true));
      schema.addIndex(aspect);

      ApplyIndexAspectStep step = new ApplyIndexAspectStep();

      step.setAspectName(aspect.getName());
View Full Code Here

Examples of org.apache.ddlutils.model.IndexColumn

  }
 
  private void fillIndex(org.apache.ddlutils.model.Index i, Field field) {
    String[] columns = ClassInfo.getColumnNames(field);
    for (String string : columns) {
      IndexColumn ic = new IndexColumn(string);
      i.addColumn(ic);
    }
  }
View Full Code Here

Examples of org.apache.ddlutils.model.IndexColumn

              index.setName(indexName);
              knownIndices.put(indexName, index);
          }
 
          IndexColumn indexColumn = new IndexColumn();
 
          indexColumn.setName((String)values.get("COLUMN_NAME"));
          if (values.containsKey("ORDINAL_POSITION"))
          {
              indexColumn.setOrdinalPosition(((Short)values.get("ORDINAL_POSITION")).intValue());
          }
          index.addColumn(indexColumn);
        }
    }
View Full Code Here

Examples of org.apache.ddlutils.model.IndexColumn

                printIdentifier(getTableName(table));
                print(" (");
   
                for (int idx = 0; idx < index.getColumnCount(); idx++)
                {
                    IndexColumn idxColumn = index.getColumn(idx);
                    Column      col       = table.findColumn(idxColumn.getName());
   
                    if (col == null)
                    {
                        // would get null pointer on next line anyway, so throw exception
                        throw new ModelException("Invalid column '" + idxColumn.getName() + "' on index " + index.getName() + " for table " + table.getName());
                    }
                    if (idx > 0)
                    {
                        print(", ");
                    }
View Full Code Here

Examples of org.apache.ddlutils.model.IndexColumn

        }
        print(" (");

        for (int idx = 0; idx < index.getColumnCount(); idx++)
        {
            IndexColumn idxColumn = index.getColumn(idx);
            Column      col       = table.findColumn(idxColumn.getName());

            if (col == null)
            {
                // would get null pointer on next line anyway, so throw exception
                throw new ModelException("Invalid column '" + idxColumn.getName() + "' on index " + index.getName() + " for table " + table.getName());
            }
            if (idx > 0)
            {
                print(", ");
            }
View Full Code Here

Examples of org.apache.ddlutils.model.IndexColumn

                     index.getName());
        assertFalse(index.isUnique());
        assertEquals(1,
                     index.getColumnCount());

        IndexColumn indexColumn = index.getColumn(0);

        assertEquals("value",
                     indexColumn.getName());
        assertNull(indexColumn.getSize());

        index = table.getIndex(1);

        assertNull(index.getName());
        assertFalse(index.isUnique());
        assertEquals(2,
                     index.getColumnCount());

        indexColumn = index.getColumn(0);

        assertEquals("when",
                     indexColumn.getName());
        assertNull(indexColumn.getSize());

        indexColumn = index.getColumn(1);

        assertEquals("id",
                     indexColumn.getName());
        assertNull(indexColumn.getSize());

        assertEquals(
            "<?xml version=\"1.0\"?>\n<!DOCTYPE database SYSTEM \"" + LocalEntityResolver.DTD_PREFIX + "\">\n" +
            "  <database name=\"test\">\n" +
            "    <table name=\"TableWidthIndex\">\n" +
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.