/** {@inheritDoc} */ @Override public Row getTemplateRow() { return innerTable().getTemplateRow(); }
private SearchRow getSearchRow(SearchRow row, int columnId, Value v, boolean max) { if (row == null) { row = table.getTemplateRow(); } else { v = getMax(row.getValue(columnId), v, max); } if (columnId < 0) { row.setKey(v.getLong()); } else { row.setValue(columnId, v); } return row; }
private SearchRow getSpatialSearchRow(SearchRow row, int columnId, Value v) { if (row == null) { row = table.getTemplateRow(); } else if (row.getValue(columnId) != null) { // if an object needs to overlap with both a and b, // then it needs to overlap with the the union of a and b // (not the intersection) ValueGeometry vg = (ValueGeometry) row.getValue(columnId). convertTo(Value.GEOMETRY); v = ((ValueGeometry) v.convertTo(Value.GEOMETRY)). getEnvelopeUnion(vg); } if (columnId < 0) { row.setKey(v.getLong()); } else { row.setValue(columnId, v); } return row; }
private synchronized void addMeta(Session session, DbObject obj) { int id = obj.getId(); if (id > 0 && !starting && !obj.isTemporary()) { Row r = meta.getTemplateRow(); MetaRecord rec = new MetaRecord(obj); rec.setRecord(r); objectIds.set(id); if (SysProperties.CHECK) { verifyMetaLocked(session); } meta.addRow(session, r); if (isMultiVersion()) { // TODO this should work without MVCC, but avoid risks at the // moment session.log(meta, UndoLogRecord.INSERT, r); } } }
return false; current = table.getTemplateRow(); Value[] values = result.currentRow(); for (int i = 0, len = current.getColumnCount(); i < len; i++) {
setCurrentRowNumber(x + 1); Expression[] expr = list.get(x); Row newRow = table.getTemplateRow(); for (int i = 0, len = columns.length; i < len; i++) { Column c = columns[i]; count++; Value[] r = rows.currentRow(); Row newRow = table.getTemplateRow(); setCurrentRowNumber(count); for (int j = 0; j < columns.length; j++) {
private Row addRowImpl(Value[] values) { Row newRow = table.getTemplateRow(); setCurrentRowNumber(++rowNumber); for (int j = 0, len = columns.length; j < len; j++) { Column c = columns[j]; int index = c.getColumnId(); try { Value v = c.convert(values[j], session.getDatabase().getMode()); newRow.setValue(index, v); } catch (DbException ex) { throw setRow(ex, rowNumber, getSQL(values)); } } table.validateConvertUpdateSequence(session, newRow); boolean done = table.fireBeforeRow(session, null, newRow); if (!done) { table.addRow(session, newRow); session.log(table, UndoLogRecord.INSERT, newRow); table.fireAfterRow(session, null, newRow, false); return newRow; } return null; }
generatedKeys.nextRow(); Expression[] expr = valuesExpressionList.get(x); Row newRow = targetTable.getTemplateRow(); for (int i = 0, len = columns.length; i < len; i++) { Column c = columns[i]; generatedKeys.nextRow(); Value[] r = rows.currentRow(); Row newRow = targetTable.getTemplateRow(); setCurrentRowNumber(count); for (int j = 0; j < columns.length; j++) {
Row check = refTable.getTemplateRow(); for (int i = 0, len = columns.length; i < len; i++) { int idx = columns[i].column.getColumnId();
session.startStatementWithinTransaction(); generatedKeys.nextRow(); Row newRow = table.getTemplateRow(); Expression[] expr = list.get(x); setCurrentRowNumber(x + 1);
Row newRow = table.getTemplateRow(); boolean setOnUpdate = false; for (int i = 0; i < columnCount; i++) {
start = table.getTemplateRow();
/** {@inheritDoc} */ @Override public Row getTemplateRow() { return innerTable().getTemplateRow(); }
public boolean next() throws SQLException { boolean result = rs.next(); if (!result) { rs.close(); current = null; return false; } current = table.getTemplateRow(); for (int i = 0; i < current.getColumnCount(); i++) { Column col = table.getColumn(i); Value v = DataType.readValue(session, rs, i + 1, col.getType()); current.setValue(i, v); } return true; }
private void find(Value v) { v = inColumn.convert(v); int id = inColumn.getColumnId(); if (start == null) { start = table.getTemplateRow(); } start.setValue(id, v); cursor = index.find(tableFilter, start, start); }
private void find(Value v) { v = inColumn.convert(v); int id = inColumn.getColumnId(); if (start == null) { start = table.getTemplateRow(); } start.setValue(id, v); cursor = index.find(tableFilter, start, start); }
private SearchRow getSearchRow(SearchRow row, int columnId, Value v, boolean max) { if (row == null) { row = table.getTemplateRow(); } else { v = getMax(row.getValue(columnId), v, max); } if (columnId < 0) { row.setKey(v.getLong()); } else { row.setValue(columnId, v); } return row; }
public Row get() throws SQLException { if (current == null && currentSearchRow != null) { if (table.isClustered()) { current = table.getTemplateRow(); for (int i = 0; i < currentSearchRow.getColumnCount(); i++) { current.setValue(i, currentSearchRow.getValue(i)); } } else { current = cursor.get(); } } return current; }
private SearchRow getSearchRow(SearchRow row, int columnId, Value v, boolean max) { if (row == null) { row = table.getTemplateRow(); } else { v = getMax(row.getValue(columnId), v, max); } if (columnId < 0) { row.setKey(v.getLong()); } else { row.setValue(columnId, v); } return row; }
public boolean next() throws SQLException { boolean res = result.next(); if (!res) { result.reset(); current = null; return false; } current = table.getTemplateRow(); Value[] values = result.currentRow(); for (int i = 0; i < current.getColumnCount(); i++) { Value v = i < values.length ? values[i] : ValueNull.INSTANCE; current.setValue(i, v); } return true; }