@RegisterMapper(Host.Mapper.class)
public interface HostDAO extends DAO {
@SqlQuery("SELECT * FROM hosts LIMIT :limit")
ImmutableList<Host> findAll(@Bind("limit") int limit, @Bind("order") String order)
throws DBIException;
void close();
}
Any idea what is going on?
It might have something to do with
https://code.google.com/a/apache-extras.org/p/cassandra-jdbc/issues/detail?id=72
since the LIMIT is an integer…
--
You received this message because you are subscribed to the Google Groups "jDBI" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jdbi+uns...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2241 / Virus Database: 3162/5785 - Release Date: 04/30/13
( K_LIMIT rows=INTEGER { numRecords = Integer.parseInt($rows.text); } )?/** * SELECT * (REVERSED)? <expression> * FROM * <CF> * USING * CONSISTENCY <LEVEL> * WHERE * KEY = "key1" AND KEY = "key2" AND * COL > 1 AND COL < 100 * LIMIT <NUMBER>; */ selectStatement returns [SelectStatement expr] : { int numRecords = 10000; SelectExpression expression = null; boolean isCountOp = false; ConsistencyLevel cLevel = ConsistencyLevel.ONE; } K_SELECT ( s1=selectExpression { expression = s1; } | K_COUNT '(' s2=selectExpression ')' { expression = s2; isCountOp = true; } ) K_FROM (keyspace=(IDENT | STRING_LITERAL | INTEGER) '.')? columnFamily=( IDENT | STRING_LITERAL | INTEGER ) ( K_USING K_CONSISTENCY K_LEVEL { cLevel = ConsistencyLevel.valueOf($K_LEVEL.text.toUpperCase()); } )? ( K_WHERE whereClause )? ( K_LIMIT rows=INTEGER { numRecords = Integer.parseInt($rows.text); } )? endStmnt { return new SelectStatement(expression, isCountOp, $keyspace.text, $columnFamily.text, cLevel, $whereClause.clause, numRecords); } ;-Brian1) http://svn.apache.org/repos/asf/cassandra/tags/cassandra-1.0.6/src/java/org/apache/cassandra/cql/Cql.g