Package org.apache.cassandra.cql3

Examples of org.apache.cassandra.cql3.CQL3Row


        return column_metadata.remove(def.name) != null;
    }

    private CFMetaData updateCfDef()
    {
        cqlCfDef = new CFDefinition(this);
        return this;
    }
View Full Code Here


        return column_metadata.remove(def.name) != null;
    }

    private CFMetaData updateCfDef()
    {
        cqlCfDef = new CFDefinition(this);
        return this;
    }
View Full Code Here

         * object (partitionKeyColumns, ...) and the one stored in CFDefinition.
         * Ultimately, we should probably merge both. However, there is enough details to fix that
         * it's worth doing that in a separate issue.
         */
        rebuildCQL3Metadata();
        cqlCfDef = new CFDefinition(this);
        return this;
    }
View Full Code Here

                        {
                            final Cell cell = cells.next();
                            if (cell.isMarkedForDelete(now))
                                continue;

                            return new CQL3Row()
                            {
                                public ByteBuffer getClusteringColumn(int i)
                                {
                                    return cell.name().get(i);
                                }
View Full Code Here

                        {
                            final Cell cell = cells.next();
                            if (cell.isMarkedForDelete(now))
                                continue;

                            CQL3Row toReturn = null;
                            CellName current = cell.name();
                            if (currentRow == null || !current.isSameCQL3RowAs(previous))
                            {
                                toReturn = currentRow;
                                currentRow = new CQL3RowOfSparse(current);
                            }
                            currentRow.add(cell);
                            previous = current;

                            if (toReturn != null)
                                return toReturn;
                        }
                        if (currentRow != null)
                        {
                            CQL3Row toReturn = currentRow;
                            currentRow = null;
                            return toReturn;
                        }
                        return endOfData();
                    }
View Full Code Here

            {
                final Cell cell = cells.next();
                if (!cell.isLive(now))
                    continue;

                return new CQL3Row()
                {
                    public ByteBuffer getClusteringColumn(int i)
                    {
                        return cell.name().get(i);
                    }
View Full Code Here

        protected CQL3Row computeNext()
        {
            while (hasNextCell())
            {
                CQL3Row toReturn = null;
                CellName current = nextCell.name();
                if (currentRow == null || !current.isSameCQL3RowAs(type, previous))
                {
                    toReturn = currentRow;
                    currentRow = new CQL3RowOfSparse(cfMetaData, current);
                }
                currentRow.add(nextCell);
                nextCell = null;
                previous = current;

                if (toReturn != null)
                    return toReturn;
            }
            if (currentRow != null)
            {
                CQL3Row toReturn = currentRow;
                currentRow = null;
                return toReturn;
            }
            return endOfData();
        }
View Full Code Here

            {
                final Cell cell = cells.next();
                if (!cell.isLive(now))
                    continue;

                return new CQL3Row()
                {
                    public ByteBuffer getClusteringColumn(int i)
                    {
                        return cell.name().get(i);
                    }
View Full Code Here

        protected CQL3Row computeNext()
        {
            while (hasNextCell())
            {
                CQL3Row toReturn = null;
                CellName current = nextCell.name();
                if (currentRow == null || !current.isSameCQL3RowAs(type, previous))
                {
                    toReturn = currentRow;
                    currentRow = new CQL3RowOfSparse(cfMetaData, current);
                }
                currentRow.add(nextCell);
                nextCell = null;
                previous = current;

                if (toReturn != null)
                    return toReturn;
            }
            if (currentRow != null)
            {
                CQL3Row toReturn = currentRow;
                currentRow = null;
                return toReturn;
            }
            return endOfData();
        }
View Full Code Here

            List<ModificationStatement> statements = new ArrayList<ModificationStatement>(queryOrIdList.size());
            for (int i = 0; i < queryOrIdList.size(); i++)
            {
                Object query = queryOrIdList.get(i);
                CQLStatement statement;
                if (query instanceof String)
                {
                    statement = QueryProcessor.parseStatement((String)query, state);
                }
                else
                {
                    statement = QueryProcessor.getPrepared((MD5Digest)query);
                    if (statement == null)
                        throw new PreparedQueryNotFoundException((MD5Digest)query);
                }

                List<ByteBuffer> queryValues = values.get(i);
                if (queryValues.size() != statement.getBoundsTerms())
                    throw new InvalidRequestException(String.format("There were %d markers(?) in CQL but %d bound variables",
                                                                    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;
View Full Code Here

TOP

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

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.