Reputation: 305
Row row = DataSession._getSession().execute("select count (*) from sivri_service.bronzelist").one();
int expected = row.getVarint("count").intValue();
I am attempting to get the count from a table, but I cannot seem to get past this exception: com.datastax.driver.core.exceptions.InvalidTypeException: Column count is of type bigint
Upvotes: 9
Views: 3257
Reputation: 57748
"Column count is of type bigint"
Based on this chart which maps CQL3 data types to Java types, you'll want to get that value as a long
, instead.
long expected = row.getLong("count");
Note: I am making a (educated) guess that you are using Java. Next time, please indicate this in your question to remove any doubt.
Upvotes: 14