Package org.apache.hadoop.hbase.hbql.statement

Examples of org.apache.hadoop.hbase.hbql.statement.ConnectionStatement


        if (Utils.isSelectStatement(statement)) {
            throw new HBqlException("executeUpdate() requires a non-SELECT statement");
        }
        else if (Utils.isDMLStatement(statement)) {
            final ConnectionStatement stmt = ((ConnectionStatement)statement);
            final ExecutionResults results = stmt.evaluatePredicateAndExecute(this.getHConnectionImpl());
            return results.getCount();
        }
        else if (Utils.isConnectionStatemet(statement)) {
            final ConnectionStatement stmt = ((ConnectionStatement)statement);
            stmt.evaluatePredicateAndExecute(this.getHConnectionImpl());
            return 0;
        }
        else if (Utils.isNonConectionStatemet(statement)) {
            final NonConnectionStatement stmt = ((NonConnectionStatement)statement);
            stmt.execute();
            return 0;
        }
        else {
            throw new InternalErrorException("Bad state with " + statement.getClass().getSimpleName());
        }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.hbql.statement.ConnectionStatement

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.