From 68d571bf716a1c7fc982f08a807ef8d15c3a579b Mon Sep 17 00:00:00 2001 From: Ben Merckx Date: Sat, 28 Dec 2019 16:52:35 +0100 Subject: [PATCH] Change limit of intiterator to function as from ... to, fixes #85 --- src/tink/sql/Limit.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tink/sql/Limit.hx b/src/tink/sql/Limit.hx index 0a7eed9..9fa22e2 100644 --- a/src/tink/sql/Limit.hx +++ b/src/tink/sql/Limit.hx @@ -9,7 +9,7 @@ private typedef LimitData = { abstract Limit(LimitData) from LimitData to LimitData { @:from static function ofIter(i:IntIterator):Limit - return @:privateAccess { limit: i.min, offset: i.max }; + return @:privateAccess { limit: i.max - i.min, offset: i.min }; @:from static function ofInt(i:Int):Limit return { limit: i, offset: 0 };