added support for limit set to zero or negative as no limit

This commit is contained in:
kennycud
2024-10-14 03:56:22 -07:00
parent 187a360467
commit 27cc9e458e
2 changed files with 15 additions and 1 deletions

View File

@@ -238,7 +238,7 @@ public class HSQLDBCacheUtils {
if( offset.isPresent() ) stream = stream.skip(offset.get());
// truncate to limit
if( limit.isPresent() ) stream = stream.limit(limit.get());
if( limit.isPresent() && limit.get() > 0 ) stream = stream.limit(limit.get());
// include metadata
if( includeMetadata.isEmpty() || !includeMetadata.get() )