Examples of ResultInterface


Examples of com.alibaba.wasp.jdbc.result.ResultInterface

  public ResultSet executeQuery(String sql) throws SQLException {
    synchronized (session) {
      checkClosed();
      closeOldResultSet();
      CommandInterface command = conn.prepareCommand(sql, fetchSize, session);
      ResultInterface result = null;
      setExecutingStatement(command);
      try {
        result = command.executeQuery(maxRows);
        session.setSessionId(result.getSessionId());
      } finally {
        setExecutingStatement(null);
      }
      command.close();
      resultSet = new JdbcResultSet(conn, this, result, closedByResultSet);
View Full Code Here

Examples of com.alibaba.wasp.jdbc.result.ResultInterface

      synchronized (session) {
        setExecutingStatement(command);
        try {
          if (command.isQuery()) {
            returnsResultSet = true;
            ResultInterface result = command.executeQuery(maxRows);
            resultSet = new JdbcResultSet(conn, this, result, closedByResultSet);
          } else {
            returnsResultSet = false;
            updateCount = command.executeUpdate();
          }
View Full Code Here

Examples of com.alibaba.wasp.jdbc.result.ResultInterface

  public ResultSet executeQuery() throws SQLException {
    try {
      synchronized (session) {
        checkClosed();
        closeOldResultSet();
        ResultInterface result;
        try {
          setExecutingStatement(command);
          result = command.executeQuery(maxRows);
        } finally {
          setExecutingStatement(null);
View Full Code Here

Examples of com.alibaba.wasp.jdbc.result.ResultInterface

          closeOldResultSet();
          try {
            setExecutingStatement(command);
            if (command.isQuery()) {
              returnsResultSet = true;
              ResultInterface result = command.executeQuery(maxRows);
              resultSet = new JdbcResultSet(conn, this, result,
                  closedByResultSet);
            } else {
              returnsResultSet = false;
              updateCount = command.executeUpdate();
View Full Code Here

Examples of com.alibaba.wasp.jdbc.result.ResultInterface

   */
  @Override
  public ResultSetMetaData getMetaData() throws SQLException {
    try {
      checkClosed();
      ResultInterface result = command.getMetaData();
      if (result == null) {
        return null;
      }
      String catalog = conn.getCatalog();
      JdbcResultSetMetaData meta = new JdbcResultSetMetaData(null, result,
View Full Code Here

Examples of org.h2.result.ResultInterface

    public boolean isReadOnly() throws SQLException {
        try {
            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

        try {
            debugCodeCall("getCatalog");
            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

        try {
            debugCodeCall("getQueryTimeout");
            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
            return (queryTimeout + 999) / 1000;
View Full Code Here

Examples of org.h2.result.ResultInterface

    public int getTransactionIsolation() throws SQLException {
        try {
            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;
                break;
View Full Code Here

Examples of org.h2.result.ResultInterface

    /**
     * INTERNAL
     */
    ResultSet getGeneratedKeys(JdbcStatement stat, int id) {
        getGeneratedKeys = prepareCommand("SELECT SCOPE_IDENTITY() WHERE SCOPE_IDENTITY() IS NOT NULL", getGeneratedKeys);
        ResultInterface result = getGeneratedKeys.executeQuery(0, false);
        ResultSet rs = new JdbcResultSet(this, stat, result, id, false, true, false);
        return rs;
    }
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.