package org.gcube.application.geoportal.service.engine.mongo;

import org.bson.BsonType;
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
import org.junit.Test;

import static com.mongodb.client.model.Filters.type;

public class ManagementUseCases extends MongoTests {


    @Test
    public void deleteByQuery() throws ConfigurationException {
        MongoTester tester = new MongoTester("profiledConcessioni");

        System.out.println("Using builders..");
        tester.getCollection().
                find(type("_profileID", BsonType.NULL))
//                find(exists("profileID",false))
                .forEach(printBlock);

//                deleteMany(type("_profileID", BsonType.NULL));

    }


}
