private ByteBuffer[] bindInternal(QueryOptions options) throws InvalidRequestException { int version = options.getProtocolVersion(); ByteBuffer[] buffers = new ByteBuffer[elements.size()]; for (int i = 0; i < elements.size(); i++) { buffers[i] = elements.get(i).bindAndGet(options); // Inside tuples, we must force the serialization of collections to v3 whatever protocol // version is in use since we're going to store directly that serialized value. if (version < 3 && type.type(i).isCollection()) buffers[i] = ((CollectionType)type.type(i)).getSerializer().reserializeToV3(buffers[i]); } return buffers; }
private ByteBuffer[] bindInternal(QueryOptions options) throws InvalidRequestException { int version = options.getProtocolVersion(); ByteBuffer[] buffers = new ByteBuffer[values.size()]; for (int i = 0; i < type.size(); i++) { buffers[i] = values.get(i).bindAndGet(options); // Inside UDT values, we must force the serialization of collections to v3 whatever protocol // version is in use since we're going to store directly that serialized value. if (version < Server.VERSION_3 && type.fieldType(i).isCollection() && buffers[i] != null) buffers[i] = ((CollectionType)type.fieldType(i)).getSerializer().reserializeToV3(buffers[i]); } return buffers; }