Examples of fetchOne()


Examples of org.apache.hadoop.hive.service.HiveClient.fetchOne()

  @Override
  public Long count() {
    HiveClient hiveClient = createHiveClient();
    try {
      hiveClient.execute("select count(*) from " + tableName);
      return Long.parseLong(hiveClient.fetchOne());
      // checked exceptions
    } catch (HiveServerException ex) {
      throw translateExcpetion(ex);
    } catch (org.apache.thrift.TException tex) {
      throw translateExcpetion(tex);
View Full Code Here

Examples of org.jooq.SelectQuery.fetchOne()

        assertEquals(2, result.size());
        assertEquals("Coelho", result.get(0).getValue(TAuthor_LAST_NAME()));
        assertEquals("Orwell", result.get(1).getValue(TAuthor_LAST_NAME()));

        try {
            q.fetchOne();
            fail();
        }
        catch (InvalidResultException expected) {}

        Record record = q.fetchAny();
View Full Code Here

Examples of org.jooq.impl.Factory.fetchOne()

        catch (DetachedException expected) {}

        store.attach(create);
        store.refresh();
        assertEquals(1, store.delete());
        assertNull(create.fetchOne(TBookStore(), TBookStore_NAME().equal("Barnes and Noble")));
    }

    @Test
    public void testDual() throws Exception {
        assertEquals(1, (int) create().selectOne().fetchOne(0, Integer.class));
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.