Examples of generateWhereClauseForSelect()


Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMetaStatementGenerator.generateWhereClauseForSelect()

            final boolean staticColumn = counterMeta.structure().isStaticColumn();

            RegularStatement incrementStatement = prepareWhereClauseForCounterUpdate(statementGenerator, update(keyspaceName,tableName).with(incr(cql3ColumnName, bindMarker(cql3ColumnName))), staticColumn, noOptions());
            RegularStatement decrementStatement = prepareWhereClauseForCounterUpdate(statementGenerator, update(keyspaceName,tableName).with(decr(cql3ColumnName, bindMarker(cql3ColumnName))), staticColumn, noOptions());

            RegularStatement selectStatement = statementGenerator.generateWhereClauseForSelect(Optional.fromNullable(counterMeta), select(cql3ColumnName).from(keyspaceName,tableName));

            incrStatementPerCounter.put(propertyName, session.prepare(incrementStatement));
            decrStatementPerCounter.put(propertyName, session.prepare(decrementStatement));
            selectStatementPerCounter.put(propertyName, session.prepare(selectStatement));
        }
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMetaStatementGenerator.generateWhereClauseForSelect()

            selectStatementPerCounter.put(propertyName, session.prepare(selectStatement));
        }
        clusteredCounterPSMap.put(INCR, incrStatementPerCounter);
        clusteredCounterPSMap.put(DECR, decrStatementPerCounter);

        RegularStatement selectStatement = statementGenerator.generateWhereClauseForSelect(Optional.<PropertyMeta>absent(), select().from(keyspaceName,tableName));
        selectStatementPerCounter.put(SELECT_ALL.name(), session.prepare(selectStatement));
        clusteredCounterPSMap.put(SELECT, selectStatementPerCounter);

        RegularStatement deleteStatement = statementGenerator.generateWhereClauseForDelete(false, delete().from(keyspaceName,tableName));
        clusteredCounterPSMap.put(DELETE, of(DELETE_ALL.name(), session.prepare(deleteStatement)));
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMetaStatementGenerator.generateWhereClauseForSelect()

        when(statementGenerator.prepareCommonWhereClauseForUpdate(update("table").with(incr("count", bindMarker("count"))), false))
                .thenReturn(update("table").where());
        when(statementGenerator.prepareCommonWhereClauseForUpdate(update("table").with(decr("count", bindMarker("count"))), false))
                .thenReturn(update("table").where());
        when(statementGenerator.generateWhereClauseForSelect(Optional.fromNullable(counterMeta), select("count").from("table")))
                .thenReturn(select("count").from("table").where(eq("id", bindMarker("id"))));
        when(statementGenerator.generateWhereClauseForSelect(Optional.<PropertyMeta>absent(), select().from("table")))
                .thenReturn(select().from("table"));
        when(statementGenerator.generateWhereClauseForDelete(false, delete().from("table")))
                .thenReturn(delete().from("table"));
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMetaStatementGenerator.generateWhereClauseForSelect()

                .thenReturn(update("table").where());
        when(statementGenerator.prepareCommonWhereClauseForUpdate(update("table").with(decr("count", bindMarker("count"))), false))
                .thenReturn(update("table").where());
        when(statementGenerator.generateWhereClauseForSelect(Optional.fromNullable(counterMeta), select("count").from("table")))
                .thenReturn(select("count").from("table").where(eq("id", bindMarker("id"))));
        when(statementGenerator.generateWhereClauseForSelect(Optional.<PropertyMeta>absent(), select().from("table")))
                .thenReturn(select().from("table"));
        when(statementGenerator.generateWhereClauseForDelete(false, delete().from("table")))
                .thenReturn(delete().from("table"));

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.