Examples of ensureCase()


Examples of com.impetus.client.cassandra.thrift.CQLTranslator.ensureCase()

        selectQuery =
            StringUtils.replace(selectQuery, CQLTranslator.COLUMN_FAMILY,
                translator.ensureCase(new StringBuilder(), tableName, false).toString());
        selectQuery =
            StringUtils.replace(selectQuery, CQLTranslator.COLUMNS,
                translator.ensureCase(new StringBuilder(), columnName, false).toString());

        StringBuilder selectQueryBuilder = new StringBuilder(selectQuery);

        selectQueryBuilder.append(CQLTranslator.ADD_WHERE_CLAUSE);
View Full Code Here

Examples of com.impetus.client.cassandra.thrift.CQLTranslator.ensureCase()

    {
        MetaDataHandler handler = new MetaDataHandler();
        CQLTranslator translator = new CQLTranslator();
        String columnFamilyQuery = CQLTranslator.CREATE_COLUMNFAMILY_QUERY;
        columnFamilyQuery = StringUtils.replace(columnFamilyQuery, CQLTranslator.COLUMN_FAMILY,
                translator.ensureCase(new StringBuilder(), tableInfo.getTableName(), false).toString());

        List<ColumnInfo> columns = tableInfo.getColumnMetadatas();

        Properties cfProperties = getColumnFamilyProperties(tableInfo);
View Full Code Here

Examples of com.impetus.client.cassandra.thrift.CQLTranslator.ensureCase()

    private void dropTableUsingCql(TableInfo tableInfo) throws Exception
    {

        CQLTranslator translator = new CQLTranslator();
        StringBuilder dropQuery = new StringBuilder("drop table ");
        translator.ensureCase(dropQuery, tableInfo.getTableName(), false);

        KunderaCoreUtils.printQuery(dropQuery.toString(), showQuery);

        cassandra_client.execute_cql3_query(ByteBuffer.wrap(dropQuery.toString().getBytes()), Compression.NONE,
                ConsistencyLevel.ONE);
View Full Code Here

Examples of com.impetus.client.cassandra.thrift.CQLTranslator.ensureCase()

     */
    private void addColumnToTable(TableInfo tableInfo, ColumnInfo column) throws Exception
    {
        CQLTranslator translator = new CQLTranslator();
        StringBuilder addColumnQuery = new StringBuilder("ALTER TABLE ");
        translator.ensureCase(addColumnQuery, tableInfo.getTableName(), false);
        addColumnQuery.append(" ADD ");
        translator.ensureCase(addColumnQuery, column.getColumnName(), false);
        addColumnQuery.append(" "
                + translator.getCQLType(CassandraValidationClassMapper.getValidationClass(column.getType(),
                        isCql3Enabled(tableInfo))));
View Full Code Here

Examples of com.impetus.client.cassandra.thrift.CQLTranslator.ensureCase()

    {
        CQLTranslator translator = new CQLTranslator();
        StringBuilder addColumnQuery = new StringBuilder("ALTER TABLE ");
        translator.ensureCase(addColumnQuery, tableInfo.getTableName(), false);
        addColumnQuery.append(" ADD ");
        translator.ensureCase(addColumnQuery, column.getColumnName(), false);
        addColumnQuery.append(" "
                + translator.getCQLType(CassandraValidationClassMapper.getValidationClass(column.getType(),
                        isCql3Enabled(tableInfo))));
        try
        {
View Full Code Here

Examples of com.impetus.client.cassandra.thrift.CQLTranslator.ensureCase()

                metadata.setName_types(name_types);
                metadata.setValue_types(value_types);
                CQLTranslator translator = new CQLTranslator();
                final String describeTable = "select * from ";
                StringBuilder builder = new StringBuilder(describeTable);
                translator.ensureCase(builder, tableInfo.getTableName(), false);
                builder.append("LIMIT 1");
                cassandra_client.set_cql_version(CassandraConstants.CQL_VERSION_3_0);
                CqlResult cqlResult = cassandra_client.execute_cql3_query(ByteBufferUtil.bytes(builder.toString()),
                        Compression.NONE, ConsistencyLevel.ONE);

View Full Code Here

Examples of com.impetus.client.cassandra.thrift.CQLTranslator.ensureCase()

                : CQLTranslator.SELECTALL_QUERY;

        CQLTranslator translator = new CQLTranslator();

        selectQuery = StringUtils.replace(selectQuery, CQLTranslator.COLUMN_FAMILY,
                translator.ensureCase(new StringBuilder(), m.getTableName(), false).toString());

        builder = CassandraUtilities.appendColumns(builder, columns, selectQuery, translator);

        addWhereClause(builder);
View Full Code Here

Examples of com.impetus.client.cassandra.thrift.CQLTranslator.ensureCase()

        CQLTranslator translator = new CQLTranslator();
        String update_Query = translator.UPDATE_QUERY;

        String tableName = metadata.getTableName();
        update_Query = StringUtils.replace(update_Query, CQLTranslator.COLUMN_FAMILY,
                translator.ensureCase(new StringBuilder(), tableName, false).toString());

        StringBuilder builder = new StringBuilder(update_Query);

        Object ttlColumns = ((CassandraClientBase) persistenceDelegeator.getClient(metadata)).getTtlValues().get(
                metadata.getTableName());
View Full Code Here

Examples of com.impetus.client.cassandra.thrift.CQLTranslator.ensureCase()

        CQLTranslator translator = new CQLTranslator();
        String delete_query = translator.DELETE_QUERY;

        String tableName = kunderaQuery.getEntityMetadata().getTableName();
        delete_query = StringUtils.replace(delete_query, CQLTranslator.COLUMN_FAMILY,
                translator.ensureCase(new StringBuilder(), tableName, false).toString());

        StringBuilder builder = new StringBuilder(delete_query);
        builder.append(CQLTranslator.ADD_WHERE_CLAUSE);

        Class compoundKeyClass = metadata.getIdAttribute().getBindableJavaType();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.