Package db
Class DatabaseUtils
java.lang.Object
db.DatabaseUtils
DatabaseUtils
provides a collection of database related utilities.-
Method Summary
Modifier and TypeMethodDescriptionstatic void
moveRecords
(Table table, long oldStart, long newStart, long size) Reassign the long key assigned to a contiguous group of records within a table.
-
Method Details
-
moveRecords
public static void moveRecords(Table table, long oldStart, long newStart, long size) throws IOException Reassign the long key assigned to a contiguous group of records within a table. A shift in the key value is computed as the difference of oldStart and newStart. Existing records whose keys lie within the new range will be removed prior to moving the target set of records.- Parameters:
table
- table within which records should be moved.oldStart
- old key value for start of rangenewStart
- new key value for start of rangesize
- determines the range of keys to be moved (oldStart to oldStart+size-1, inclusive)- Throws:
IOException
- if there is an error moving the records
-