@Test(expected = HecateException.class) public void testGetValueInvalidType() { withSession(session -> { session.execute("update counter_table set counter_value = counter_value + 1 where id = '1'"); ResultSet rs = session.execute("select * from counter_table"); CqlUtils.toList(rs.one()); }); }
public static List<Object> toList(TupleValue tuple) { List<DataType> componentTypes = tuple.getType().getComponentTypes(); List<Object> results = new ArrayList<>(componentTypes.size()); int index = 0; for (DataType dataType : componentTypes) { results.add(getValue(tuple, index++, dataType)); } return results; }
CqlUtils { public static List<Object> toList(TupleValue tuple) { List<DataType> componentTypes = tuple.getType().getComponentTypes(); List<Object> results = new ArrayList<>(componentTypes.size()); int index = 0; for (DataType dataType : componentTypes) { results.add(getValue(tuple, index++, dataType)); } return results; } }
CqlUtils { public static List<Object> toList(TupleValue tuple) { List<DataType> componentTypes = tuple.getType().getComponentTypes(); List<Object> results = new ArrayList<>(componentTypes.size()); int index = 0; for (DataType dataType : componentTypes) { results.add(getValue(tuple, index++, dataType)); } return results; } private  CqlUtils(); }
CqlUtils { public static List<Object> toList(TupleValue tuple) { List<DataType> componentTypes = tuple.getType().getComponentTypes(); List<Object> results = new ArrayList<>(componentTypes.size()); int index = 0; for (DataType dataType : componentTypes) { results.add(getValue(tuple, index++, dataType)); } return results; } private  CqlUtils(); static BoundStatement bind(PreparedStatement statement, Object[] params); static Object getValue(GettableByIndexData gettable, int columnIndex, DataType dataType); static List<Object> toList(TupleValue tuple); static List<Object> toList(Row row); }
CqlUtils { public static List<Object> toList(TupleValue tuple) { List<DataType> componentTypes = tuple.getType().getComponentTypes(); List<Object> results = new ArrayList<>(componentTypes.size()); int index = 0; for (DataType dataType : componentTypes) { results.add(getValue(tuple, index++, dataType)); } return results; } private  CqlUtils(); static BoundStatement bind(PreparedStatement statement, Object[] params); static Object getValue(GettableByIndexData gettable, int columnIndex, DataType dataType); static List<Object> toList(TupleValue tuple); static List<Object> toList(Row row); static final Logger CQL_LOGGER; }