@Override
    public Iterable<K> loadAllKeys() {
        // If loadAllKeys property is disabled, don't load anything
        if (!genericMapStoreProperties.loadAllKeys) {
            return Collections.emptyList();
        }

        awaitSuccessfulInit();

        String sql = queries.loadAllKeys();
        SqlResult keysResult = sqlService.execute(sql);

        // The contract for loadAllKeys says that if iterator implements Closable
        // then it will be closed when the iteration is over
        return () -> new MappingClosingIterator<>(
                keysResult.iterator(),
                (SqlRow row) -> row.getObject(genericMapStoreProperties.idColumn),
                keysResult::close
        );
    }
@Test
    public void givenRow_whenLoadAllKeysWithSingleColumn_thenReturnKeys() {
        ObjectSpec spec = objectProvider.createObject(mapName);
        mapLoaderSingleColumn = createMapLoaderSingleColumn();

        objectProvider.insertItems(spec, 1);

        List<Integer> ids = newArrayList(mapLoaderSingleColumn.loadAllKeys());
        assertThat(ids).contains(0);
    }