Package org.apache.cassandra.cql3

Examples of org.apache.cassandra.cql3.ResultSet


        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


        }
    }

    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

        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

        {
            Set<?> s = validator.compose(params.variables.get(values.bindIndex));
            Iterator<?> iter = s.iterator();
            while (iter.hasNext())
            {
                ColumnNameBuilder b = iter.hasNext() ? builder.copy() : builder;
                ByteBuffer name = b.add(validator.nameComparator().decompose(iter.next())).build();
                cf.addColumn(params.makeColumn(name, ByteBufferUtil.EMPTY_BYTE_BUFFER));
            }
        }
        catch (MarshalException e)
        {
View Full Code Here

        {
            Set<?> s = validator.compose(params.variables.get(values.bindIndex));
            Iterator<?> iter = s.iterator();
            while (iter.hasNext())
            {
                ColumnNameBuilder b = iter.hasNext() ? builder.copy() : builder;
                ByteBuffer name = b.add(validator.nameComparator().decompose(iter.next())).build();
                cf.addColumn(params.makeTombstone(name));
            }
        }
        catch (MarshalException e)
        {
View Full Code Here

    private void doAdd(ColumnFamily cf, ColumnNameBuilder builder, CollectionType validator, UpdateParameters params) throws InvalidRequestException
    {
        for (int i = 0; i < values.size(); ++i)
        {
            ColumnNameBuilder b = i == values.size() - 1 ? builder : builder.copy();
            ByteBuffer name = b.add(values.get(i).getByteBuffer(validator.nameComparator(), params.variables)).build();
            cf.addColumn(params.makeColumn(name, ByteBufferUtil.EMPTY_BYTE_BUFFER));
        }
    }
View Full Code Here

    private void doDiscard(ColumnFamily cf, ColumnNameBuilder builder, CollectionType validator, UpdateParameters params) throws InvalidRequestException
    {
        for (int i = 0; i < values.size(); ++i)
        {
            ColumnNameBuilder b = i == values.size() - 1 ? builder : builder.copy();
            ByteBuffer name = b.add(values.get(i).getByteBuffer(validator.nameComparator(), params.variables)).build();
            cf.addColumn(params.makeTombstone(name));
        }
    }
View Full Code Here

        {
            List<?> l = validator.compose(params.variables.get(values.bindIndex));

            for (int i = 0; i < l.size(); i++)
            {
                ColumnNameBuilder b = i == l.size() - 1 ? builder : builder.copy();
                ByteBuffer uuid = ByteBuffer.wrap(UUIDGen.getTimeUUIDBytes());
                ByteBuffer name = b.add(uuid).build();
                cf.addColumn(params.makeColumn(name, validator.valueComparator().decompose(l.get(i))));
            }
        }
        catch (MarshalException e)
        {
View Full Code Here

        {
            List<?> l = validator.compose(params.variables.get(values.bindIndex));

            for (int i = 0; i < l.size(); i++)
            {
                ColumnNameBuilder b = i == l.size() - 1 ? builder : builder.copy();
                PrecisionTime pt = getNextTime(time);
                ByteBuffer uuid = ByteBuffer.wrap(UUIDGen.getTimeUUIDBytes(pt.millis, pt.nanos));
                ByteBuffer name = b.add(uuid).build();
                cf.addColumn(params.makeColumn(name, validator.valueComparator().decompose(l.get(i))));
            }
        }
        catch (MarshalException e)
        {
View Full Code Here

    private void doAppend(ColumnFamily cf, ColumnNameBuilder builder, CollectionType validator, UpdateParameters params) throws InvalidRequestException
    {
        for (int i = 0; i < values.size(); i++)
        {
            ColumnNameBuilder b = i == values.size() - 1 ? builder : builder.copy();
            ByteBuffer uuid = ByteBuffer.wrap(UUIDGen.getTimeUUIDBytes());
            ByteBuffer name = b.add(uuid).build();
            cf.addColumn(params.makeColumn(name, values.get(i).getByteBuffer(validator.valueComparator(), params.variables)));
        }
    }
View Full Code Here

TOP

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

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.