Package org.apache.cassandra.cql3

Examples of org.apache.cassandra.cql3.QueryOptions


        return cfDef;
    }

    private void updateCfDef()
    {
        cqlCfDef = new CFDefinition(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

        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

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

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

                throw new org.apache.cassandra.exceptions.InvalidRequestException("supercolumn name must not be empty");
            if (metadata.cfType == ColumnFamilyType.Standard)
                throw new org.apache.cassandra.exceptions.InvalidRequestException("supercolumn specified to ColumnFamily " + metadata.cfName + " containing normal columns");
        }
        AbstractType<?> comparator = SuperColumns.getComparatorFor(metadata, superColumnName);
        CFDefinition cfDef = metadata.getCfDef();
        boolean isCQL3Table = !metadata.isThriftCompatible();
        for (ByteBuffer name : column_names)
        {
            if (name.remaining() > maxNameLength)
                throw new org.apache.cassandra.exceptions.InvalidRequestException("column name length must not be greater than " + maxNameLength);
View Full Code Here

            String keyAliases = ByteBufferUtil.string(cqlRow.columns.get(5).value);
            List<String> keys = FBUtilities.fromJsonList(keyAliases);
            // classis thrift tables
            if (keys.size() == 0)
            {
                CFDefinition cfDefinition = getCfDefinition(keyspace, column_family, client);
                for (ColumnIdentifier column : cfDefinition.keys.keySet())
                {
                    String key = column.toString();
                    String type = cfDefinition.keys.get(column).type.toString();
                    logger.debug("name: {}, type: {} ", key, type);
View Full Code Here

            // if CassandraStorage, just return the empty list
            if (cassandraStorage)
                return columnDefs;

            // otherwise for CqlStorage, check metadata for classic thrift tables
            CFDefinition cfDefinition = getCfDefinition(keyspace, column_family, client);
            for (ColumnIdentifier column : cfDefinition.metadata.keySet())
            {
                ColumnDef cDef = new ColumnDef();
                String columnName = column.toString();
                String type = cfDefinition.metadata.get(column).type.toString();
View Full Code Here

    {
        KsDef ksDef = client.describe_keyspace(ks);
        for (CfDef cfDef : ksDef.cf_defs)
        {
            if (cfDef.name.equalsIgnoreCase(cf))
                return new CFDefinition(CFMetaData.fromThrift(cfDef));
        }
        return null;
    }
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.QueryOptions

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.