Package org.lealone.expression

Examples of org.lealone.expression.Expression


            for (Column nc : newColumns) {
                if (columnList.length() > 0) {
                    columnList.append(", ");
                }
                if (type == CommandInterface.ALTER_TABLE_ADD_COLUMN && columnsToAdd.contains(nc)) {
                    Expression def = nc.getDefaultExpression();
                    columnList.append(def == null ? "NULL" : def.getSQL());
                } else {
                    columnList.append(nc.getSQL());
                }
            }
            buff.append(" AS SELECT ");
View Full Code Here


    protected Row createRow(Expression[] expr, int rowId) {
        Row newRow = table.getTemplateRow();
        for (int i = 0, len = columns.length; i < len; i++) {
            Column c = columns[i];
            int index = c.getColumnId();
            Expression e = expr[i];
            if (e != null) {
                // e can be null (DEFAULT)
                try {
                    Value v = c.convert(e.getValue(session));
                    newRow.setValue(index, v);
                } catch (DbException ex) {
                    throw setRow(ex, rowId, getSQL(expr));
                }
            }
View Full Code Here

            for (Expression[] expr : list) {
                if (expr.length != columns.length) {
                    throw DbException.get(ErrorCode.COLUMN_COUNT_DOES_NOT_MATCH);
                }
                for (int i = 0; i < expr.length; i++) {
                    Expression e = expr[i];
                    if (e != null) {
                        expr[i] = e.optimize(session);
                    }
                }
            }
        } else {
            query.prepare();
View Full Code Here

    private void setParameters() {
        Prepared prepared = procedure.getPrepared();
        ArrayList<Parameter> params = prepared.getParameters();
        for (int i = 0; params != null && i < params.size() && i < expressions.size(); i++) {
            Expression expr = expressions.get(i);
            Parameter p = params.get(i);
            p.setValue(expr.getValue(session));
        }
    }
View Full Code Here

TOP

Related Classes of org.lealone.expression.Expression

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.