Gotta get this rant off my chest.
As much as I dislike that the JDBC developers decided to make the indexing for PreparedStatements 1-based (as shown in the Javadocs below), I wish that BoundStatement used the same convention. That would have saved me about 4 wasted hours.
In lieu of that, I at least wish all of the Cassandra documentation and Javadocs made that a lot clearer. For an API that feels a lot like JDBC to use a different convention like this was an unexpected and unwelcome surprise.
setString
void setString(int parameterIndex,
String x)
throws SQLException
Sets the designated parameter to the given Java String
value. The driver converts this to an SQL VARCHAR
or LONGVARCHAR
value (depending on the argument's size relative to the driver's limits on VARCHAR
values) when it sends it to the database.
- Parameters:
parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter value