Package org.lealone.result

Examples of org.lealone.result.Row


        return row;
    }

    protected Row createRow(Value[] values) {
        Row newRow = table.getTemplateRow();
        for (int j = 0, len = columns.length; j < len; j++) {
            Column c = columns[j];
            int index = c.getColumnId();
            Value v = c.convert(values[j]);
            newRow.setValue(index, v);
        }

        return newRow;
    }
View Full Code Here


        setCurrentRowNumber(0);
        if (list.size() > 0) {
            count = 0;
            for (int x = 0, size = list.size(); x < size; x++) {
                Expression[] expr = list.get(x);
                Row newRow;
                try {
                    newRow = createRow(expr, x);
                    if (newRow == null) {
                        continue;
                    }
                } catch (DbException ex) {
                    throw setRow(ex, count + 1, getSQL(expr));
                }
                setCurrentRowNumber(++count);
                merge(newRow);
            }
        } else {
            ResultInterface rows = query.query(0);
            count = 0;
            table.fire(session, Trigger.UPDATE | Trigger.INSERT, true);
            table.lock(session, true, false);
            while (rows.next()) {
                Value[] values = rows.currentRow();
                Row newRow;
                try {
                    newRow = createRow(values);
                    if (newRow == null) {
                        continue;
                    }
View Full Code Here

        }
        return count;
    }

    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

        }
        return newRow;
    }

    protected Row createRow(Value[] values) {
        Row newRow = table.getTemplateRow();
        for (int j = 0; j < columns.length; j++) {
            Column c = columns[j];
            int index = c.getColumnId();
            Value v = c.convert(values[j]);
            newRow.setValue(index, v);
        }
        return newRow;
    }
View Full Code Here

TOP

Related Classes of org.lealone.result.Row

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.