* MEDIUM
- implement table creation w/ complex columns
* MEDIUM
-- implement (optional) foreign key enforcement
- * MEDIUM
- implement write support for properties
* EASY
- implement table, column, index renaming
- clean up javadocs
- enhance public api classes
* add @usage tags to util classes
-* change CodecHandler usage to handle not-inline decoding
- - pass filename to CodecHandler, enable pwd callbacks CallbackHandler
- - pass custom context to CodecHandler?
- - rework CryptCodecProvider to have custom
- javax.security.auth.callback.CallbackHandler which is only invoked if
- password is definitely required.
- implement page buffering in PageChannel
* need to implement logical flushing in update code (startUpdate/finishUpdate)
-- refactor free-space handlers Table/Column?
- implement "lazy" usage maps (load on first usage)?
-- implement some OLE support
- add typed getter methods to Row
if(TableImpl.rowFitsOnDataPage(dataLength, lvalPage, getFormat())) {
// the current page has space
return lvalPage;
-}
+ }
}
// need new page
TempPageHolder rowBufferH)
throws IOException
{
- // find last data page (Not bothering to check other pages for free
- // space.)
+ // find last data page (Not bothering to check other pages for free
+ // space.)
UsageMap.PageCursor revPageCursor = ownedPages.cursor();
- revPageCursor.afterLast();
- while(true) {
- int tmpPageNumber = revPageCursor.getPreviousPage();
- if(tmpPageNumber < 0) {
- break;
- }
+ revPageCursor.afterLast();
+ while(true) {
+ int tmpPageNumber = revPageCursor.getPreviousPage();
+ if(tmpPageNumber < 0) {
+ break;
+ }
+ // only use if actually listed in free space pages
+ if(!freeSpacePages.containsPageNumber(tmpPageNumber)) {
+ continue;
+ }
ByteBuffer dataPage = rowBufferH.setPage(ownedPages.getPageChannel(),
tmpPageNumber);
- if(dataPage.get() == PageTypes.DATA) {
- // found last data page, only use if actually listed in free space
- // pages
- if(freeSpacePages.containsPageNumber(tmpPageNumber)) {
- return dataPage;
- }
- }
+ if(dataPage.get() == PageTypes.DATA) {
+ // found last data page with free space
+ return dataPage;
}
+ }
return null;
- }
+ }
/**
* Updates the table definition after rows are modified.
_handler.addOrRemovePageNumber(pageNumber, true, false);
}
- /**
- * Remove a page number from this usage map
- */
- public void removePageNumber(int pageNumber) throws IOException {
- removePageNumber(pageNumber, false);
- }
-
/**
* Remove a page number from this usage map
*/
}
// lastly, remove the new page
- removePageNumber(newPageNumber);
+ removePageNumber(newPageNumber, false);
}
}