@Test void selectRowCountShouldReturnEmptyByDefault() { Optional<Integer> maybeRowCount = testee.selectRowCount(BUCKET_NAME, BLOB_ID).blockOptional(); assertThat(maybeRowCount).isEmpty(); }
Mono<Integer> selectRowCount(BucketName bucketName, BlobId blobId) { return cassandraAsyncExecutor.executeSingleRow( select.bind() .setString(BUCKET, bucketName.asString()) .setString(ID, blobId.asString())) .map(row -> row.getInt(NUMBER_OF_CHUNK)); }
CassandraBucketDAO { Mono<Integer> selectRowCount(BucketName bucketName, BlobId blobId) { return cassandraAsyncExecutor.executeSingleRow( select.bind() .setString(BUCKET, bucketName.asString()) .setString(ID, blobId.asString())) .map(row -> row.getInt(NUMBER_OF_CHUNK)); } }
CassandraBucketDAO { Mono<Integer> selectRowCount(BucketName bucketName, BlobId blobId) { return cassandraAsyncExecutor.executeSingleRow( select.bind() .setString(BUCKET, bucketName.asString()) .setString(ID, blobId.asString())) .map(row -> row.getInt(NUMBER_OF_CHUNK)); } @Inject @VisibleForTesting  CassandraBucketDAO(BlobId.Factory blobIdFactory, Session session); }
CassandraBucketDAO { Mono<Integer> selectRowCount(BucketName bucketName, BlobId blobId) { return cassandraAsyncExecutor.executeSingleRow( select.bind() .setString(BUCKET, bucketName.asString()) .setString(ID, blobId.asString())) .map(row -> row.getInt(NUMBER_OF_CHUNK)); } @Inject @VisibleForTesting  CassandraBucketDAO(BlobId.Factory blobIdFactory, Session session); Flux<Pair<BucketName, BlobId>> listAll(); }
CassandraBucketDAO { Mono<Integer> selectRowCount(BucketName bucketName, BlobId blobId) { return cassandraAsyncExecutor.executeSingleRow( select.bind() .setString(BUCKET, bucketName.asString()) .setString(ID, blobId.asString())) .map(row -> row.getInt(NUMBER_OF_CHUNK)); } @Inject @VisibleForTesting  CassandraBucketDAO(BlobId.Factory blobIdFactory, Session session); Flux<Pair<BucketName, BlobId>> listAll();  }