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

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


        super(connectionImpl);

        this.statement = Utils.parseHBqlStatement(sql);

        if ((this.getStatement() instanceof StatementWithParameters)) {
            final StatementWithParameters paramStmt = (StatementWithParameters)this.getStatement();
            // Need to call this here to enable setParameters
            paramStmt.validate(this.getHConnectionImpl());
        }
    }
View Full Code Here


        return null;
    }

    private void setParameter(final int i, final Object val) throws HBqlException {
        HPreparedStatementImpl.checkForNullParameterValue(val);
        final StatementWithParameters paramStmt = HPreparedStatementImpl.getParameterStatement(this.getStatement());
        final NamedParameter param = paramStmt.getNamedParameters().getParameter(i);
        param.setParameter(val);
    }
View Full Code Here

        if (!(this.getStatement() instanceof StatementWithParameters)) {
            throw new HBqlException(this.getStatement().getClass().getSimpleName()
                                    + " statements do not support parameters");
        }

        final StatementWithParameters paramStmt = (StatementWithParameters)this.getStatement();
        paramStmt.resetParameters();
    }
View Full Code Here

        this.sql = sql;

        this.statement = Utils.parseHBqlStatement(sql);

        if ((this.getStatement() instanceof StatementWithParameters)) {
            final StatementWithParameters paramStmt = (StatementWithParameters)this.getStatement();

            // Need to call this here to enable setParameters
            paramStmt.validate(this.getHConnectionImpl());
        }
    }
View Full Code Here

        return this.execute(this.getStatement());
    }

    public int setParameter(final String name, final Object val) throws HBqlException {
        checkForNullParameterValue(val);
        final StatementWithParameters paramStmt = getParameterStatement(this.getStatement());
        return paramStmt.setStatementParameter(name, val);
    }
View Full Code Here

        return paramStmt.setStatementParameter(name, val);
    }

    public void setParameter(final int i, final Object val) throws HBqlException {
        checkForNullParameterValue(val);
        final StatementWithParameters paramStmt = getParameterStatement(this.getStatement());
        final NamedParameter param = paramStmt.getNamedParameters().getParameter(i);
        param.setParameter(val);
    }
View Full Code Here

        final NamedParameter param = paramStmt.getNamedParameters().getParameter(i);
        param.setParameter(val);
    }

    public void resetParameters() throws HBqlException {
        final StatementWithParameters paramStmt = getParameterStatement(this.getStatement());
        paramStmt.resetParameters();
    }
View Full Code Here

TOP

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

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.