Package org.apache.cassandra.cql3.statements

Examples of org.apache.cassandra.cql3.statements.ColumnGroupMap


    public List<Pair<ByteBuffer, Column>> getPrefetchedList(ByteBuffer rowKey, ByteBuffer cql3ColumnName)
    {
        if (prefetchedLists == null)
            return Collections.emptyList();

        ColumnGroupMap m = prefetchedLists.get(rowKey);
        return m == null ? Collections.<Pair<ByteBuffer, Column>>emptyList() : m.getCollection(cql3ColumnName);
    }
View Full Code Here


    public List<Pair<ByteBuffer, IColumn>> getPrefetchedList(ByteBuffer rowKey, ByteBuffer cql3ColumnName)
    {
        if (prefetchedLists == null)
            return Collections.emptyList();

        ColumnGroupMap m = prefetchedLists.get(rowKey);
        return m == null ? Collections.<Pair<ByteBuffer, IColumn>>emptyList() : m.getCollection(cql3ColumnName);
    }
View Full Code Here

    private static CFMetaData compile(int id, String cql, String keyspace)
    {
        try
        {
            CreateColumnFamilyStatement statement = (CreateColumnFamilyStatement) QueryProcessor.parseStatement(cql).prepare().statement;
            CFMetaData cfmd = newSystemMetadata(keyspace, statement.columnFamily(), id, "", statement.comparator, null);
            statement.applyPropertiesTo(cfmd);
            return cfmd;
        }
        catch (RequestValidationException e)
        {
            throw new RuntimeException(e);
View Full Code Here

    private static CFMetaData compile(Integer id, String cql, String keyspace)
    {
        try
        {
            CreateColumnFamilyStatement statement = (CreateColumnFamilyStatement) QueryProcessor.parseStatement(cql).prepare().statement;
            CFMetaData cfmd = newSystemMetadata(keyspace, statement.columnFamily(), id, "", statement.comparator, null);
            statement.applyPropertiesTo(cfmd);
            return cfmd;
        }
        catch (RequestValidationException e)
        {
            throw new RuntimeException(e);
View Full Code Here

    private static CFMetaData compile(Integer id, String cql, String keyspace)
    {
        try
        {
            CreateColumnFamilyStatement statement = (CreateColumnFamilyStatement) QueryProcessor.parseStatement(cql).prepare().statement;
            CFMetaData cfmd = newSystemMetadata(keyspace, statement.columnFamily(), id, "", statement.comparator, null);
            statement.applyPropertiesTo(cfmd);
            return cfmd;
        }
        catch (RequestValidationException e)
        {
            throw new RuntimeException(e);
View Full Code Here

    private static CFMetaData compile(Integer id, String cql, String keyspace)
    {
        try
        {
            CreateColumnFamilyStatement statement = (CreateColumnFamilyStatement) QueryProcessor.parseStatement(cql).prepare().statement;
            CFMetaData cfmd = newSystemMetadata(keyspace, statement.columnFamily(), id, "", statement.comparator, null);
            statement.applyPropertiesTo(cfmd);
            return cfmd;
        }
        catch (RequestValidationException e)
        {
            throw new RuntimeException(e);
View Full Code Here

        read(end);
        return false;
    }

    private KSPropDefs parseKSPropDefs() {
        KSPropDefs defs = new KSPropDefs();
        try {
            read("WITH");
            do {
                String name = readUniqueIdentifier().toLowerCase(Locale.US);
                read("=");
                if (readIf("{")) {
                    defs.addProperty(name, parseMap());
                } else {
                    Expression value = readExpression();
                    defs.addProperty(name, value.optimize(session).getValue(session).toString());
                }
            } while (readIf("AND"));

            defs.validate();
        } catch (SyntaxException e) {
            throw getSyntaxError();
        }
        return defs;
    }
View Full Code Here

        if (readIf("AUTHORIZATION")) {
            command.setAuthorization(readUniqueIdentifier());
        } else {
            command.setAuthorization(session.getUser().getName());
        }
        KSPropDefs defs = parseKSPropDefs();
        command.setKSPropDefs(defs);
        return command;
    }
View Full Code Here

    protected Prepared parseAlterKeyspace() {
        AlterKeyspace command = new AlterKeyspace(session);
        command.setKeyspaceName(readUniqueIdentifier());

        KSPropDefs defs = parseKSPropDefs();
        command.setKSPropDefs(defs);
        command.validate();
        return command;
    }
View Full Code Here

                                                                    statement.getBoundsTerms(),
                                                                    queryValues.size()));
                if (!(statement instanceof ModificationStatement))
                    throw new InvalidRequestException("Invalid statement in batch: only UPDATE, INSERT and DELETE statements are allowed.");

                ModificationStatement mst = (ModificationStatement)statement;
                if (mst.isCounter())
                {
                    if (type != BatchStatement.Type.COUNTER)
                        throw new InvalidRequestException("Cannot include counter statement in a non-counter batch");
                }
                else
View Full Code Here

TOP

Related Classes of org.apache.cassandra.cql3.statements.ColumnGroupMap

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.