Package org.teiid.jdbc

Examples of org.teiid.jdbc.PreparedStatementImpl


          Prepared previous = this.preparedMap.remove(prepareName);
          if (previous != null) {
            previous.stmt.close();
          }
         
          PreparedStatementImpl stmt = this.connection.prepareStatement(modfiedSQL);
          this.preparedMap.put(prepareName, new Prepared(prepareName, sql, stmt, paramType));
          this.client.prepareCompleted(prepareName);
        } catch (SQLException e) {
          errorOccurred(e);
        }
View Full Code Here


      if (query.sql.trim().isEmpty()) {
        this.client.emptyQueryReceived();
        return;
      }
     
            final PreparedStatementImpl stmt = query.stmt;
            try {
              // maxRows = 0, means unlimited.
              if (maxRows != 0) {
                stmt.setMaxRows(maxRows);
              }
             
                this.executionFuture = stmt.submitExecute();
                executionFuture.addCompletionListener(new ResultsFuture.CompletionListener<Boolean>() {
              @Override
              public void onCompletion(ResultsFuture<Boolean> future) {
                executionFuture = null;
                        try {
                          ResultsFuture<Void> result = null;
                      if (future.get()) {
                        result = new ResultsFuture<Void>();
                              client.sendResults(query.sql, stmt.getResultSet(), result, true);
                      } else {
                        result = ResultsFuture.NULL_FUTURE;
                        client.sendUpdateCount(query.sql, stmt.getUpdateCount());
                        setEncoding();
                      }
                  result.addCompletionListener(new ResultsFuture.CompletionListener<Void>() {
                              public void onCompletion(ResultsFuture<Void> future) {
                                try {
View Full Code Here

TOP

Related Classes of org.teiid.jdbc.PreparedStatementImpl

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.