Implement getObject method on Row class

Description

Currently there is no ability to get a column value off a Row as an Object. The data type must always be known as a consequence.

While it is possible to do this via a helper method (see ), with more recent version of the driver this helper requires that the developer also includes the protocol version which does make it a bit less friendly for developers
e.g.
public static Object getObject(Row r, int index, int protocolVersion) {
return r.getColumnDefinitions().getType(index).deserialize(r.getBytesUnsafe(index), protocolVersion);
}

There are situations where the ability to write generic code to handle Rows like this is required and it would be helpful if this was part of the driver.

Environment

None

Pull Requests

None

Activity

Show:
Sylvain Lebresne
December 15, 2014, 11:03 AM

I'll note that while I've disagreed with the addition of such method in the past (on the argument that it was easily doable with an helper function), I can admit that having to pass the protocol version makes it a bit more awkward now. So I think I'm now fine with adding this.

Fixed

Assignee

Olivier Michallat

Reporter

Johnny Miller

Labels

PM Priority

None

Affects versions

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Components

Priority

Minor
Configure