Make NEXT_NO_DUPLICATE and PREV_NO_DUPLICATE behave the same as NEXT and PREV for object store cursors

This commit is contained in:
Ben Turner 2010-06-15 13:21:20 -07:00
parent d1b409e700
commit 468d30fd90

View File

@ -971,12 +971,6 @@ IDBObjectStoreRequest::OpenCursor(nsIIDBKeyRange* aKeyRange,
aDirection = nsIIDBCursor::NEXT;
}
if (aDirection == nsIIDBCursor::NEXT_NO_DUPLICATE ||
aDirection == nsIIDBCursor::PREV_NO_DUPLICATE) {
NS_NOTYETIMPLEMENTED("Implement me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
if (aPreload) {
NS_NOTYETIMPLEMENTED("Implement me!");
return NS_ERROR_NOT_IMPLEMENTED;
@ -1641,10 +1635,12 @@ OpenCursorHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
switch (mDirection) {
case nsIIDBCursor::NEXT:
case nsIIDBCursor::NEXT_NO_DUPLICATE:
query.AppendLiteral(" DESC");
break;
case nsIIDBCursor::PREV:
case nsIIDBCursor::PREV_NO_DUPLICATE:
query.AppendLiteral(" ASC");
break;