Examples of ColumnIdentifier


Examples of org.apache.cassandra.cql3.ColumnIdentifier

        }
    }

    public static ColumnSpecification keySpecOf(ColumnSpecification column, MapType type)
    {
        return new ColumnSpecification(column.ksName, column.cfName, new ColumnIdentifier("key(" + column.name + ")", true), type.keys);
    }
View Full Code Here

Examples of org.apache.cassandra.cql3.ColumnIdentifier

        return new ColumnSpecification(column.ksName, column.cfName, new ColumnIdentifier("key(" + column.name + ")", true), type.keys);
    }

    public static ColumnSpecification valueSpecOf(ColumnSpecification column, MapType type)
    {
        return new ColumnSpecification(column.ksName, column.cfName, new ColumnIdentifier("value(" + column.name + ")", true), type.values);
    }
View Full Code Here

Examples of org.apache.cassandra.cql3.ColumnIdentifier

        }
    }

    public static ColumnSpecification indexSpecOf(ColumnSpecification column)
    {
        return new ColumnSpecification(column.ksName, column.cfName, new ColumnIdentifier("idx(" + column.name + ")", true), Int32Type.instance);
    }
View Full Code Here

Examples of org.apache.cassandra.cql3.ColumnIdentifier

        return new ColumnSpecification(column.ksName, column.cfName, new ColumnIdentifier("idx(" + column.name + ")", true), Int32Type.instance);
    }

    public static ColumnSpecification valueSpecOf(ColumnSpecification column, ListType type)
    {
        return new ColumnSpecification(column.ksName, column.cfName, new ColumnIdentifier("value(" + column.name + ")", true), type.elements);
    }
View Full Code Here

Examples of org.apache.cassandra.cql3.ColumnIdentifier

                int columnIndex = composite.types.size() - (cfDef.hasCollections ? 2 : 1);
                ByteBuffer CQL3ColumnName = components[columnIndex];
                if (!CQL3ColumnName.hasRemaining())
                    continue; // Row marker, ok

                ColumnIdentifier columnId = new ColumnIdentifier(CQL3ColumnName, composite.types.get(columnIndex));
                if (cfDef.metadata.get(columnId) == null)
                    throw new org.apache.cassandra.exceptions.InvalidRequestException(String.format("Invalid cell for CQL3 table %s. The CQL3 column component (%s) does not correspond to a defined CQL3 column",
                                                                                                    metadata.cfName, columnId));

                // On top of that, if we have a collection component, he (CQL3) column must be a collection
View Full Code Here

Examples of org.apache.cassandra.cql3.ColumnIdentifier

        return create(prefix, rowMarkerId, false);
    }

    protected ColumnIdentifier idFor(ByteBuffer bb)
    {
        ColumnIdentifier id = internedIds.get(bb);
        return id == null ? new ColumnIdentifier(bb, columnNameType) : id;
    }
View Full Code Here

Examples of org.apache.cassandra.cql3.ColumnIdentifier

    public static ColumnSpecification makeArgSpec(ColumnSpecification receiver, Function fun, int i)
    {
        return new ColumnSpecification(receiver.ksName,
                receiver.cfName,
                new ColumnIdentifier("arg" + i +  "(" + fun.name() + ")", true),
                fun.argsType().get(i));
    }
View Full Code Here

Examples of org.apache.cassandra.cql3.ColumnIdentifier

    /**
     * Returns a ColumnDefinition given a cell name.
     */
    public ColumnDefinition getColumnDefinition(CellName cellName)
    {
        ColumnIdentifier id = cellName.cql3ColumnName(this);
        ColumnDefinition def = id == null
                             ? getColumnDefinition(cellName.toByteBuffer())  // Means a dense layout, try the full column name
                             : getColumnDefinition(id);

        // It's possible that the def is a PRIMARY KEY or COMPACT_VALUE one in case a concrete cell
View Full Code Here

Examples of org.apache.cassandra.cql3.ColumnIdentifier

    private static Map<ColumnIdentifier, Long> convertDroppedColumns(Map<String, Long> raw)
    {
        Map<ColumnIdentifier, Long> converted = Maps.newHashMap();
        for (Map.Entry<String, Long> entry : raw.entrySet())
            converted.put(new ColumnIdentifier(entry.getKey(), true), entry.getValue());
        return converted;
    }
View Full Code Here

Examples of org.apache.cassandra.cql3.ColumnIdentifier

    /**
     * Returns a ColumnDefinition given a cell name.
     */
    public ColumnDefinition getColumnDefinition(CellName cellName)
    {
        ColumnIdentifier id = cellName.cql3ColumnName(this);
        ColumnDefinition def = id == null
                             ? getColumnDefinition(cellName.toByteBuffer())  // Means a dense layout, try the full column name
                             : getColumnDefinition(id);

        // It's possible that the def is a PRIMARY KEY or COMPACT_VALUE one in case a concrete cell
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.