Examples of currentRow()


Examples of com.alibaba.wasp.jdbc.result.ResultRemote.currentRow()

        isQuery = result.isQuery();
        if (isQuery()) {
          throw JdbcException.get(SQLErrorCode.METHOD_NOT_ALLOWED_FOR_QUERY,
              "sql:" + sql);
        }
        Value[] values = result.currentRow();
        if (values == null || values.length == 0) {
          return 0;
        }
        if (values[0] instanceof ValueInt) {
          return ((ValueInt) values[0]).getInt();
View Full Code Here

Examples of com.alibaba.wasp.jdbc.result.ResultRemote.currentRow()

        isQuery = result.isQuery();
        if (isQuery()) {
          throw JdbcException.get(SQLErrorCode.METHOD_NOT_ALLOWED_FOR_QUERY,
              "sql:" + sql);
        }
        Value[] values = result.currentRow();
        if (values == null || values.length == 0) {
          return 0;
        }
        if (values[0] instanceof ValueInt) {
          return ((ValueInt) values[0]).getInt();
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.query.Cursor.currentRow()

        f.setPath("/");
        List<String> paths = new ArrayList<String>();
        Cursor c = t.query(f, head, new KernelNodeState(mk, "/", head, cache));
        while (c.next()) {
            paths.add(c.currentRow().getPath());
        }
        Collections.sort(paths);
        assertEquals(Arrays.asList(
                "/", "/children", "/children/c1", "/children/c2",
                "/children/c3", "/children/c4", "/parents",
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.query.Cursor.currentRow()

        filter.restrictPath("/", Filter.PathRestriction.EXACT);
        filter.restrictProperty("foo", Operator.EQUAL,
                MemoryValueFactory.INSTANCE.createValue("bar"));
        Cursor cursor = index.query(filter, null, store.getRoot());
        assertTrue(cursor.next());
        assertEquals("/", cursor.currentRow().getPath());
        assertFalse(cursor.next());
    }

}
View Full Code Here

Examples of org.h2.result.LocalResult.currentRow()

        }
        if (result != null) {
            result.done();
            if (target != null) {
                while (result.next()) {
                    target.addRow(result.currentRow());
                }
                result.close();
                return null;
            }
            return result;
View Full Code Here

Examples of org.h2.result.LocalResult.currentRow()

        }
        if (result != null) {
            result.done();
            if (target != null) {
                while (result.next()) {
                    target.addRow(result.currentRow());
                }
                result.close();
                return null;
            }
            return result;
View Full Code Here

Examples of org.h2.result.ResultInterface.currentRow()

            debugCodeCall("isReadOnly");
            checkClosed();
            getReadOnly = prepareCommand("CALL READONLY()", getReadOnly);
            ResultInterface result = getReadOnly.executeQuery(0, false);
            result.next();
            boolean readOnly = result.currentRow()[0].getBoolean().booleanValue();
            return readOnly;
        } catch (Exception e) {
            throw logAndConvert(e);
        }
    }
View Full Code Here

Examples of org.h2.result.ResultInterface.currentRow()

            checkClosed();
            if (catalog == null) {
                CommandInterface cat = prepareCommand("CALL DATABASE()", Integer.MAX_VALUE);
                ResultInterface result = cat.executeQuery(0, false);
                result.next();
                catalog = result.currentRow()[0].getString();
                cat.close();
            }
            return catalog;
        } catch (Exception e) {
            throw logAndConvert(e);
View Full Code Here

Examples of org.h2.result.ResultInterface.currentRow()

            checkClosed();
            getQueryTimeout = prepareCommand("SELECT VALUE FROM INFORMATION_SCHEMA.SETTINGS WHERE NAME=?", getQueryTimeout);
            getQueryTimeout.getParameters().get(0).setValue(ValueString.get("QUERY_TIMEOUT"), false);
            ResultInterface result = getQueryTimeout.executeQuery(0, false);
            result.next();
            int queryTimeout = result.currentRow()[0].getInt();
            result.close();
            if (queryTimeout == 0) {
                return 0;
            }
            // round to the next second, otherwise 999 millis would return 0 seconds
View Full Code Here

Examples of org.h2.result.ResultInterface.currentRow()

            debugCodeCall("getTransactionIsolation");
            checkClosed();
            getLockMode = prepareCommand("CALL LOCK_MODE()", getLockMode);
            ResultInterface result = getLockMode.executeQuery(0, false);
            result.next();
            int lockMode = result.currentRow()[0].getInt();
            result.close();
            int transactionIsolationLevel;
            switch(lockMode) {
            case Constants.LOCK_MODE_OFF:
                transactionIsolationLevel = Connection.TRANSACTION_READ_UNCOMMITTED;
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.