protected Integer getPreparedStatement(CassandraClient client, String cqlQuery) throws Exception
{
Integer statementId = client.preparedStatements.get(cqlQuery.hashCode());
if (statementId == null)
{
CqlPreparedResult response = session.cqlVersion.startsWith("3")
? client.prepare_cql3_query(ByteBufferUtil.bytes(cqlQuery), Compression.NONE)
: client.prepare_cql_query(ByteBufferUtil.bytes(cqlQuery), Compression.NONE);
statementId = response.itemId;
client.preparedStatements.put(cqlQuery.hashCode(), statementId);
}