Package com.orientechnologies.orient.object.db

Examples of com.orientechnologies.orient.object.db.OObjectDatabaseTx.query()


            System.out.println(time);
            times.add(time);

            start = System.currentTimeMillis();
            for (int j = 0; j < operations_read; j++) {
              List<DummyObject> l = tx.query(new OSQLSynchQuery<DummyObject>(" select * from DummyObject "));
              Assert.assertEquals(l.size(), operations_write);

              if ((j + 1) % 20000 == 0) {
                System.out.println("(" + getDbId(tx) + ") " + "Operations (READ) executed: " + j + 1);
              }
View Full Code Here


        } else {
            q += (where != null ? " where " + where : "");
        }
        Long count = 0L;
        try {
            List<ODocument> lcount = db.query(new OSQLSynchQuery<Long>(q), params.toArray());
            if (!(lcount == null || lcount.isEmpty())) {
                ODocument doc = lcount.get(0);
                count = doc.field("count");
            }
        } catch (Exception e) {
View Full Code Here

            company.setEmployees((int) (100000 + i));
            company.getAddresses().add(new Address("Headquarter", redmond, "WA 98073-9717"));
            database.save(company);
        }
        assertEquals(database.countClusterElements("Company") - startRecordNumber, TOT_RECORDS);
        final List<Account> result = database.query(new OSQLSynchQuery<Account>(
                "select from Company where name.length() > 0"));

        assertTrue(result.size() > 0);
        assertEquals(result.size(), TOT_RECORDS);
View Full Code Here

            assertNotSame(account.getName().length(), 0);
        }

        assertEquals(companyRecords, TOT_RECORDS);

        final List<Company> result2 = database.query(new OSQLSynchQuery<ODocument>(
                "select * from Company where name.length() > 0"));

        assertTrue(result2.size() == TOT_RECORDS);

        Company account2;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.