Package org.ektorp.impl

Examples of org.ektorp.impl.StdCouchDbInstance


    public CouchDbDataContext(StdHttpClient.Builder httpClientBuilder) {
        this(httpClientBuilder.build());
    }

    public CouchDbDataContext(HttpClient httpClient, SimpleTableDef... tableDefs) {
        this(new StdCouchDbInstance(httpClient), tableDefs);
    }
View Full Code Here


    public CouchDbDataContext(HttpClient httpClient, SimpleTableDef... tableDefs) {
        this(new StdCouchDbInstance(httpClient), tableDefs);
    }

    public CouchDbDataContext(HttpClient httpClient) {
        this(new StdCouchDbInstance(httpClient));
    }
View Full Code Here

        if (isConfigured()) {
            httpClient = new StdHttpClient.Builder().host(getHostname()).build();

            // set up a simple database
            couchDbInstance = new StdCouchDbInstance(httpClient);

            final String databaseName = getDatabaseName();
            if (couchDbInstance.getAllDatabases().contains(databaseName)) {
                throw new IllegalStateException("Couch DB instance already has a database called " + databaseName);
            }
View Full Code Here

    public CouchDbDataContext(StdHttpClient.Builder httpClientBuilder) {
        this(httpClientBuilder.build());
    }

    public CouchDbDataContext(HttpClient httpClient, SimpleTableDef... tableDefs) {
        this(new StdCouchDbInstance(httpClient), tableDefs);
    }
View Full Code Here

    public CouchDbDataContext(HttpClient httpClient, SimpleTableDef... tableDefs) {
        this(new StdCouchDbInstance(httpClient), tableDefs);
    }

    public CouchDbDataContext(HttpClient httpClient) {
        this(new StdCouchDbInstance(httpClient));
    }
View Full Code Here

    } catch (MalformedURLException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
   
    CouchDbInstance dbInstance = new StdCouchDbInstance(couchClient);
    //cleanup
    cleanUp(dbInstance);
   
    CouchDbConnector db = null;
   
//    System.out.println("data loading (1 write per document)");
//    for(int i=0;i<5;++i){
//      System.out.println("test "+(i+1));
//      cleanUp(dbInstance);
//      cleanRevOrders(orders);
//      cleanRevOrders(orders2);
//      db = dbInstance.createConnector("orders", true);     
//      testOrdersLoad(orders, db);
//      testOrdersLoad(orders2, db);     
//    }
   
    db = dbInstance.createConnector("orders", true);
   
    System.out.println("data loading (bulk - 1000 documents in write)");
    for(int i=0;i<5;++i){
      System.out.println("test "+(i+1));
      cleanUp(dbInstance);
      cleanRevOrders(orders);
      cleanRevOrders(orders2);
      db = dbInstance.createConnector("orders", true);     
      testOrdersBulkLoad(orders, db);
      testOrdersBulkLoad(orders2, db)
      System.out.println("\n");
    }
   
View Full Code Here

      .build();
    } catch (MalformedURLException e) {
      e.printStackTrace();
    }
   
    CouchDbInstance dbInstance = new StdCouchDbInstance(couchClient);
   
    CouchDbConnector db = null;
   
    db = dbInstance.createConnector("orders", false);
   
    OrderRepository or = new OrderRepository(db);
    ViewResult result = null;
   
    System.out.println("getOrdersPerCountry");
View Full Code Here

      .build();
    } catch (MalformedURLException e) {
      e.printStackTrace();
    }
   
    CouchDbInstance dbInstance = new StdCouchDbInstance(couchClient);
   
    CouchDbConnector db = null;
   
    db = dbInstance.createConnector("orders", false);
   
    OrderRepository or = new OrderRepository(db);
    ViewResult result = null;
   
    System.out.println("getAvgUnitPricePerShipper");
View Full Code Here

      .build();
    } catch (MalformedURLException e) {
      e.printStackTrace();
    }
   
    CouchDbInstance dbInstance = new StdCouchDbInstance(couchClient);
   
    CouchDbConnector db = null;
   
    db = dbInstance.createConnector("orders", false);
   
    OrderRepository or = new OrderRepository(db);
    ViewResult result = null;
   
    System.out.println("getValueByWeek");
View Full Code Here

      .build();
    } catch (MalformedURLException e) {
      e.printStackTrace();
    }
   
    CouchDbInstance dbInstance = new StdCouchDbInstance(couchClient);
   
    CouchDbConnector db = null;
   
    db = dbInstance.createConnector("orders", false);
   
    OrderRepository or = new OrderRepository(db);
    ViewResult result = null;
   
    System.out.println("getValueSumByCountry");
View Full Code Here

TOP

Related Classes of org.ektorp.impl.StdCouchDbInstance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.