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
"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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With