Search in sources :

Example 21 with BucketManager

use of jakarta.nosql.keyvalue.BucketManager in project jnosql-diana by eclipse.

the class KeyValueTemplateConverter method success.

@Override
public KeyValueTemplate success(String value) {
    Config config = BeanManagers.getInstance(Config.class);
    final BucketManager manager = config.getValue(value, BucketManager.class);
    KeyValueTemplateProducer producer = BeanManagers.getInstance(KeyValueTemplateProducer.class);
    return producer.get(manager);
}
Also used : Config(org.eclipse.microprofile.config.Config) BucketManager(jakarta.nosql.keyvalue.BucketManager) KeyValueTemplateProducer(jakarta.nosql.mapping.keyvalue.KeyValueTemplateProducer)

Example 22 with BucketManager

use of jakarta.nosql.keyvalue.BucketManager in project jnosql-diana-driver by eclipse.

the class SearchQueryTest method afterClass.

@AfterAll
public static void afterClass() {
    CouchbaseKeyValueConfiguration configuration = CouchbaseKeyValueTcConfiguration.getTcConfiguration();
    BucketManagerFactory keyValueEntityManagerFactory = configuration.get();
    BucketManager keyValueEntityManager = keyValueEntityManagerFactory.getBucketManager(CouchbaseUtil.BUCKET_NAME);
    keyValueEntityManager.delete("city:salvador");
    keyValueEntityManager.delete("city:sao_paulo");
    keyValueEntityManager.delete("city:rio_janeiro");
    keyValueEntityManager.delete("city:manaus");
}
Also used : CouchbaseKeyValueConfiguration(org.eclipse.jnosql.communication.couchbase.keyvalue.CouchbaseKeyValueConfiguration) BucketManager(jakarta.nosql.keyvalue.BucketManager) BucketManagerFactory(jakarta.nosql.keyvalue.BucketManagerFactory) AfterAll(org.junit.jupiter.api.AfterAll)

Example 23 with BucketManager

use of jakarta.nosql.keyvalue.BucketManager in project jnosql-diana-driver by eclipse.

the class CouchbaseListTest method afterClass.

@AfterAll
public static void afterClass() {
    CouchbaseKeyValueConfiguration configuration = CouchbaseKeyValueTcConfiguration.getTcConfiguration();
    BucketManagerFactory keyValueEntityManagerFactory = configuration.get();
    BucketManager keyValueEntityManager = keyValueEntityManagerFactory.getBucketManager(CouchbaseUtil.BUCKET_NAME);
    keyValueEntityManager.delete("jnosql:list");
}
Also used : BucketManager(jakarta.nosql.keyvalue.BucketManager) BucketManagerFactory(jakarta.nosql.keyvalue.BucketManagerFactory) AfterAll(org.junit.jupiter.api.AfterAll)

Example 24 with BucketManager

use of jakarta.nosql.keyvalue.BucketManager in project jnosql-diana-driver by eclipse.

the class DefaultCouchbaseBucketManagerFactoryTest method shouldReturnManager.

@Test
public void shouldReturnManager() {
    BucketManager database = factory.getBucketManager(CouchbaseUtil.BUCKET_NAME);
    assertNotNull(database);
}
Also used : BucketManager(jakarta.nosql.keyvalue.BucketManager) Test(org.junit.jupiter.api.Test)

Example 25 with BucketManager

use of jakarta.nosql.keyvalue.BucketManager in project jnosql-diana-driver by eclipse.

the class CouchbaseDocumentCollectionManagerTest method afterClass.

@AfterAll
public static void afterClass() {
    CouchbaseKeyValueConfiguration configuration = CouchbaseKeyValueTcConfiguration.getTcConfiguration();
    BucketManagerFactory keyValueEntityManagerFactory = configuration.get();
    BucketManager keyValueEntityManager = keyValueEntityManagerFactory.getBucketManager(CouchbaseUtil.BUCKET_NAME);
    keyValueEntityManager.delete("person:id");
}
Also used : CouchbaseKeyValueConfiguration(org.eclipse.jnosql.communication.couchbase.keyvalue.CouchbaseKeyValueConfiguration) BucketManager(jakarta.nosql.keyvalue.BucketManager) BucketManagerFactory(jakarta.nosql.keyvalue.BucketManagerFactory) AfterAll(org.junit.jupiter.api.AfterAll)

Aggregations

BucketManager (jakarta.nosql.keyvalue.BucketManager)25 BucketManagerFactory (jakarta.nosql.keyvalue.BucketManagerFactory)8 AfterAll (org.junit.jupiter.api.AfterAll)8 Test (org.junit.jupiter.api.Test)7 Params (jakarta.nosql.Params)4 QueryException (jakarta.nosql.QueryException)4 ServiceLoaderProvider (jakarta.nosql.ServiceLoaderProvider)4 Value (jakarta.nosql.Value)4 KeyValuePreparedStatement (jakarta.nosql.keyvalue.KeyValuePreparedStatement)4 Person (jakarta.nosql.tck.entities.Person)4 User (jakarta.nosql.tck.entities.User)4 List (java.util.List)4 Collectors.toList (java.util.stream.Collectors.toList)4 Stream (java.util.stream.Stream)4 Produces (javax.enterprise.inject.Produces)4 CouchbaseKeyValueConfiguration (org.eclipse.jnosql.communication.couchbase.keyvalue.CouchbaseKeyValueConfiguration)3 Database (jakarta.nosql.mapping.Database)2 KeyValueTemplateProducer (jakarta.nosql.mapping.keyvalue.KeyValueTemplateProducer)2 DelQuery (jakarta.nosql.query.DelQuery)2 DelQueryProvider (jakarta.nosql.query.DelQuery.DelQueryProvider)2