本文整理汇总了Java中org.hsqldb.Row类的典型用法代码示例。如果您正苦于以下问题:Java Row类的具体用法?Java Row怎么用?Java Row使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Row类属于org.hsqldb包,在下文中一共展示了Row类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: dropIndexFromRows
import org.hsqldb.Row; //导入依赖的package包/类
void dropIndexFromRows(Index primaryIndex, Index oldIndex) {
RowIterator it = primaryIndex.firstRow(this);
int position = oldIndex.getPosition() - 1;
while (it.hasNext()) {
Row row = it.getNextRow();
int i = position - 1;
NodeAVL backnode = ((RowAVL) row).getNode(0);
while (i-- > 0) {
backnode = backnode.nNext;
}
backnode.nNext = backnode.nNext.nNext;
}
it.release();
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:20,代码来源:RowStoreAVL.java
示例2: addAdjusted
import org.hsqldb.Row; //导入依赖的package包/类
private void addAdjusted(Object[] data, int[] columnMap) {
try {
if (columnMap == null) {
data = (Object[]) ArrayUtil.resizeArrayIfDifferent(data,
table.getColumnCount());
} else {
Object[] newData = new Object[table.getColumnCount()];
ArrayUtil.projectRow(data, columnMap, newData);
data = newData;
}
Row row = (Row) store.getNewCachedObject(session, data);
store.indexRow(null, row);
size++;
} catch (HsqlException e) {}
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:22,代码来源:RowSetNavigatorData.java
示例3: getNewCachedObject
import org.hsqldb.Row; //导入依赖的package包/类
public CachedObject getNewCachedObject(Session session, Object object,
boolean tx) {
int id;
synchronized (this) {
id = rowIdSequence++;
}
Row row = new RowAVL(table, (Object[]) object, id, this);
if (tx) {
RowAction action = new RowAction(session, table,
RowAction.ACTION_INSERT, row,
null);
row.rowAction = action;
}
return row;
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:22,代码来源:RowStoreAVLMemory.java
示例4: delete
import org.hsqldb.Row; //导入依赖的package包/类
/**
* Row might have changed from memory to disk or indexes added
*/
public void delete(Session session, Row row) {
NodeAVL node = ((RowAVL) row).getNode(0);
int count = 0;
while (node != null) {
count++;
node = node.nNext;
}
if ((isCached ^ !row.isMemory()) || count != indexList.length) {
row = ((Table) table).getDeleteRowFromLog(session, row.getData());
}
if (row != null) {
super.delete(session, row);
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:23,代码来源:RowStoreAVLHybridExtended.java
示例5: delete
import org.hsqldb.Row; //导入依赖的package包/类
/**
* Basic delete with no logging or referential checks.
*/
public void delete(Session session, Row row) {
writeLock();
try {
for (int i = 0; i < indexList.length; i++) {
indexList[i].delete(session, this, row);
}
for (int i = 0; i < subStores.length; i++) {
subStores[i].delete(session, row);
}
row.delete(this);
long count = elementCount.decrementAndGet();
if (count > 16 * 1024 && count < baseElementCount / 2) {
baseElementCount = count;
searchCost = null;
}
} finally {
writeUnlock();
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:29,代码来源:RowStoreAVL.java
示例6: writeData
import org.hsqldb.Row; //导入依赖的package包/类
public void writeData(Row row, Type[] types) {
if (crypto == null) {
super.writeData(row, types);
} else {
int start = count;
ensureRoom(row.getStorageSize());
writeInt(0);
super.writeData(row, types);
int origLength = count - start - INT_STORE_SIZE;
int newLength = crypto.encode(buffer, start + INT_STORE_SIZE,
origLength, buffer,
start + INT_STORE_SIZE);
writeIntData(newLength, start);
count = start + INT_STORE_SIZE + newLength;
}
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:22,代码来源:RowOutputBinaryEncode.java
示例7: getNextRow
import org.hsqldb.Row; //导入依赖的package包/类
public Row getNextRow() {
if (nextnode == null) {
release();
return null;
}
lastrow = nextnode.getRow(store);
nextnode = index.next(session, store, nextnode);
if (nextnode == null) {
release();
}
return lastrow;
}
开发者ID:s-store,项目名称:s-store,代码行数:18,代码来源:IndexAVL.java
示例8: indexRows
import org.hsqldb.Row; //导入依赖的package包/类
public final void indexRows() {
RowIterator it = rowIterator();
for (int i = 1; i < indexList.length; i++) {
setAccessor(indexList[i], null);
}
while (it.hasNext()) {
Row row = it.getNextRow();
if (row instanceof RowAVL) {
((RowAVL) row).clearNonPrimaryNodes();
}
for (int i = 1; i < indexList.length; i++) {
indexList[i].insert(null, this, row);
}
}
}
开发者ID:s-store,项目名称:s-store,代码行数:21,代码来源:RowStoreAVL.java
示例9: update
import org.hsqldb.Row; //导入依赖的package包/类
public void update(Object[] oldData, Object[] newData) {
if (isSimpleAggregate) {
return;
}
RowIterator it = groupIndex.findFirstRow((Session) session, store,
oldData);
if (it.hasNext()) {
Row row = it.getNextRow();
it.removeCurrent();
it.release();
size--;
add(newData);
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:21,代码来源:RowSetNavigatorDataTable.java
示例10: getSize
import org.hsqldb.Row; //导入依赖的package包/类
public int getSize(Row row) {
reset();
try {
writeSize(0);
writeData(row, row.getTable().getColumnTypes());
writeEnd();
} catch (Exception e) {
reset();
// throw Error.error(ErrorCode.FILE_IO_ERROR, e.toString());
}
int rowsize = size();
reset();
return rowsize;
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:21,代码来源:RowOutputText.java
示例11: addRow
import org.hsqldb.Row; //导入依赖的package包/类
public boolean addRow(Row row) {
int lookup = list.getLookup(row.getId());
if (lookup == -1) {
list.put(row.getId(), row, null);
size++;
return true;
} else {
if (list.getSecondValueByIndex(lookup) != null) {
if (session.database.sqlEnforceTDCD) {
throw Error.error(ErrorCode.X_27000);
}
list.setSecondValueByIndex(lookup, null);
list.setThirdValueByIndex(lookup, null);
return true;
}
return false;
}
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:26,代码来源:RowSetNavigatorDataChangeMemory.java
示例12: getSize
import org.hsqldb.Row; //导入依赖的package包/类
public int getSize(Row r) {
reset();
try {
writeSize(0);
writeData(r.getData(), r.getTable().getColumnTypes());
writeEnd();
} catch (Exception e) {
reset();
// throw Error.error(ErrorCode.FILE_IO_ERROR, e.toString());
}
int rowsize = size();
reset();
return rowsize;
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:21,代码来源:RowOutputText.java
示例13: getNewCachedObject
import org.hsqldb.Row; //导入依赖的package包/类
public CachedObject getNewCachedObject(Session session,
Object object)
{
Row row = new RowAVL(table, (Object[]) object);
if (session != null) {
RowAction.addAction(session, RowAction.ACTION_INSERT, table, row);
}
int id = rowIdSequence++;
row.setPos(id);
rowIdMap.put(id, row);
return row;
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:18,代码来源:RowStoreAVLMemory.java
示例14: getSize
import org.hsqldb.Row; //导入依赖的package包/类
/**
* Calculate the size of byte array required to store a row.
*
* @param row - a database row
* @return size of byte array
* @exception HsqlException When data is inconsistent
*/
public int getSize(Row row) {
int size = super.getSize(row);
if (crypto != null) {
size = crypto.getEncodedSize(size - INT_STORE_SIZE)
+ INT_STORE_SIZE * 2;
}
return size;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:19,代码来源:RowOutputBinaryEncode.java
示例15: next
import org.hsqldb.Row; //导入依赖的package包/类
/**
* Returns the node after the given one
*
* @param x node
*
* @return next node
*/
private NodeAVL next(Session session, PersistentStore store, NodeAVL x) {
if (x == null) {
return null;
}
readLock.lock();
try {
while (true) {
x = next(store, x);
if (x == null) {
return x;
}
if (session == null) {
return x;
}
Row row = x.getRow(store);
if (session.database.txManager.canRead(session, row)) {
return x;
}
}
} finally {
readLock.unlock();
}
}
开发者ID:s-store,项目名称:s-store,代码行数:38,代码来源:IndexAVL.java
示例16: reindex
import org.hsqldb.Row; //导入依赖的package包/类
/**
* for result tables
*/
void reindex(Session session, Index index) {
setAccessor(index, null);
RowIterator it = table.rowIterator(session);
while (it.hasNext()) {
Row row = it.getNextRow();
// may need to clear the node before insert
index.insert(session, this, row);
}
}
开发者ID:s-store,项目名称:s-store,代码行数:17,代码来源:RowStoreAVLMemory.java
示例17: getNewCachedObject
import org.hsqldb.Row; //导入依赖的package包/类
public CachedObject getNewCachedObject(Session session, Object object,
boolean tx) {
int id = rowIdSequence.getAndIncrement();
Row row = new RowAVL(table, (Object[]) object, id, this);
if (tx) {
RowAction.addInsertAction(session, table, row);
}
return row;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:13,代码来源:RowStoreAVLMemory.java
示例18: exceptAll
import org.hsqldb.Row; //导入依赖的package包/类
public void exceptAll(Session session, RowSetNavigatorData other) {
Object[] compareData = null;
RowIterator it;
Row otherRow = null;
Object[] otherData = null;
sortFull(session);
other.sortFull(session);
it = fullIndex.emptyIterator();
while (hasNext()) {
Object[] currentData = getNext();
boolean newGroup =
compareData == null
|| fullIndex.compareRowNonUnique(
session, currentData, compareData,
fullIndex.getColumnCount()) != 0;
if (newGroup) {
compareData = currentData;
it = other.findFirstRow(currentData);
}
otherRow = it.getNextRow();
otherData = otherRow == null ? null
: otherRow.getData();
if (otherData != null
&& fullIndex.compareRowNonUnique(
session, currentData, otherData,
fullIndex.getColumnCount()) == 0) {
removeCurrent();
}
}
other.release();
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:40,代码来源:RowSetNavigatorDataTable.java
示例19: delete
import org.hsqldb.Row; //导入依赖的package包/类
public void delete(Session session, Row row) {
writeLock();
try {
super.delete(session, row);
} finally {
writeUnlock();
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:11,代码来源:RowStoreAVLDisk.java
示例20: getRow
import org.hsqldb.Row; //导入依赖的package包/类
Row getRow(PersistentStore store) {
if (!row.isInMemory()) {
return (RowAVLDisk) store.get(this.row, false);
} else {
row.updateAccessCount(store.getAccessCount());
}
return row;
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:11,代码来源:NodeAVLDisk.java
注:本文中的org.hsqldb.Row类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论