Package org.apache.cassandra.cql3

Examples of org.apache.cassandra.cql3.ColumnIdentifier


         */
        public final ColumnSpecification getColumnSpecification(CFMetaData cfm)
        {
            return new ColumnSpecification(cfm.ksName,
                                           cfm.cfName,
                                           new ColumnIdentifier(getColumnName(), true),
                                           getReturnType());
        }
View Full Code Here


        }

        void add(Cell cell)
        {
            CellName cellName = cell.name();
            ColumnIdentifier columnName =  cellName.cql3ColumnName(cfMetaData);
            if (cellName.isCollectionCell())
            {
                if (collections == null)
                    collections = new HashMap<>();
View Full Code Here

                r = clusteringSize == 0 ? EMPTY : new ByteBuffer[clusteringSize()];
                for (int i = 0; i < clusteringSize; i++)
                    r[i] = get(i, allocator);

                ByteBuffer nameBuffer = get(r.length);
                ColumnIdentifier name;

                if (nameBuffer.remaining() == 0)
                {
                    name = CompoundSparseCellNameType.rowMarkerId;
                }
View Full Code Here

        }
        else
        {
            // it's safe to simply grab based on clusteringPrefixSize() as we are only called if not a dense type
            AbstractType<?> type = cfMetaData.comparator.subtype(cfMetaData.comparator.clusteringPrefixSize());
            return new ColumnIdentifier(HeapAllocator.instance.clone(name), type);
        }
    }
View Full Code Here

    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

    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

                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));
                CFDefinition.Name columnName = cfDef.get(columnId);
                if (columnName == null || columnName.isPrimaryKeyColumn())
                    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));
View Full Code Here

                                                                                                    components.length, minComponents, metadata.cfName));

                // Furthermore, the column name must be a declared one.
                int columnIndex = composite.types.size() - (cfDef.hasCollections ? 2 : 1);
                ByteBuffer CQL3ColumnName = components[columnIndex];
                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

    private static ColumnDefinition integerColumn(String ksName, String cfName)
    {
        return new ColumnDefinition(ksName,
                                    cfName,
                                    new ColumnIdentifier(IntegerType.instance.fromString("42"), IntegerType.instance),
                                    UTF8Type.instance,
                                    null,
                                    null,
                                    null,
                                    null,
View Full Code Here

    private static ColumnDefinition utf8Column(String ksName, String cfName)
    {
        return new ColumnDefinition(ksName,
                                    cfName,
                                    new ColumnIdentifier("fortytwo", true),
                                    UTF8Type.instance,
                                    null,
                                    null,
                                    null,
                                    null,
View Full Code Here

TOP

Related Classes of org.apache.cassandra.cql3.ColumnIdentifier

Copyright © 2018 www.massapicom. 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.