diff --git a/src/box/lua/schema.lua b/src/box/lua/schema.lua index 10c0cf74c9354ed53df76ad9d7d4303b940c1ec2..0eb94162a4aee06f42dc2add3cf1bb4779d4bcba 100644 --- a/src/box/lua/schema.lua +++ b/src/box/lua/schema.lua @@ -381,16 +381,16 @@ function box.schema.space.bless(space) if opts ~= nil then if opts.offset ~= nil then - offset = tonumber(opts.offset) + offset = opts.offset end if type(opts.iterator) == "string" then opts.iterator = box.index[opts.iterator] end if opts.iterator ~= nil then - iterator = tonumber(opts.iterator) + iterator = opts.iterator end if opts.limit ~= nil then - limit = tonumber(opts.limit) + limit = opts.limit end end diff --git a/test/big/sql.result b/test/big/sql.result index 4f8a570dfe36e3adbc8c81dbbb0ef642dd3bc976..05185e29cc45dc44c9a1ecd6d2f2c00878adf493 100644 --- a/test/big/sql.result +++ b/test/big/sql.result @@ -265,7 +265,7 @@ select * from t0 where k1='part1_a' select * from t0 where k1='part_none' --- ... -box.space[0].index[1]:select({'part1', 'part2'}, { limit = 100 }) +box.space[0].index[1]:select({'part1', 'part2'}) --- - - [1234567, 'part1', 'part2'] - [11234567, 'part1', 'part2'] diff --git a/test/big/sql.test.py b/test/big/sql.test.py index be9de63fb435f1371c1a0fd10b6154e46c8a020a..7c8b8c52a61381c053af4a79af76f91a68fd8df3 100644 --- a/test/big/sql.test.py +++ b/test/big/sql.test.py @@ -98,7 +98,7 @@ sql("select * from t0 where k0=21234567") sql("select * from t0 where k1='part1'") sql("select * from t0 where k1='part1_a'") sql("select * from t0 where k1='part_none'") -admin("box.space[0].index[1]:select({'part1', 'part2'}, { limit = 100 })") +admin("box.space[0].index[1]:select({'part1', 'part2'})") sql("select * from t0 where k1='part1'") sql("select * from t0 where k1='part2'") # cleanup diff --git a/test/big/tree_pk.result b/test/big/tree_pk.result index 0fd10e8f7e975cf015230fda8245ceca613488fe..2a4bc433aefdb631b466fac78ab7075ce53f5942 100644 --- a/test/big/tree_pk.result +++ b/test/big/tree_pk.result @@ -523,7 +523,7 @@ s0:replace{5, 5, 0, 5} --- - [5, 5, 0, 5] ... -box.sort(s0.index['i2']:select(0, { limit = 100 })) +box.sort(s0.index['i2']:select(0)) --- - - [0, 0, 0, 0] - [4, 4, 0, 4] @@ -534,7 +534,7 @@ s0:delete{5} --- - [5, 5, 0, 5] ... -box.sort(s0.index['i2']:select(0, { limit = 100 })) +box.sort(s0.index['i2']:select(0)) --- - - [0, 0, 0, 0] - [4, 4, 0, 4] diff --git a/test/big/tree_pk.test.lua b/test/big/tree_pk.test.lua index 02ae7f4d1265a6b5c91105d933d043bf56bdb94c..028ec47c6b9ea0a4d784d425abb933eae5b623bd 100644 --- a/test/big/tree_pk.test.lua +++ b/test/big/tree_pk.test.lua @@ -189,9 +189,9 @@ s0:insert{4, 4, 0, 4} s0:insert{5, 5, 0, 5} s0:insert{6, 6, 0, 6} s0:replace{5, 5, 0, 5} -box.sort(s0.index['i2']:select(0, { limit = 100 })) +box.sort(s0.index['i2']:select(0)) s0:delete{5} -box.sort(s0.index['i2']:select(0, { limit = 100 })) +box.sort(s0.index['i2']:select(0)) s0:drop() s0 = nil diff --git a/test/big/tree_pk_multipart.result b/test/big/tree_pk_multipart.result index febbab6bba8e6220f82a41d8c8958fbbbc80123e..efce5b461f15b05513808263e410c4d0dce14b92 100644 --- a/test/big/tree_pk_multipart.result +++ b/test/big/tree_pk_multipart.result @@ -189,7 +189,7 @@ space.index['primary']:get{'Vincent', 'The Wolf!', 2} of this. So, pretty please... with sugar on top. Clean the fucking car.'] ... -- Select all messages from Vincent to Jules -space.index['primary']:select({'Vincent', 'Jules'}, { limit = 100 }) +space.index['primary']:select({'Vincent', 'Jules'}) --- - - ['Vincent', 'Jules', 0, 'Do you know what they call a - a - a Quarter Pounder with cheese in Paris?'] @@ -202,7 +202,7 @@ space.index['primary']:select({'Vincent', 'Jules'}, { limit = 100 }) - ['Vincent', 'Jules', 6, 'I dunno, I didn`t go into Burger King.'] ... -- Select all messages from Jules to Vincent -space.index['primary']:select({'Jules', 'Vincent'}, { limit = 100 }) +space.index['primary']:select({'Jules', 'Vincent'}) --- - - ['Jules', 'Vincent', 0, 'They don`t call it a Quarter Pounder with cheese?'] - ['Jules', 'Vincent', 1, 'Then what do they call it?'] @@ -212,7 +212,7 @@ space.index['primary']:select({'Jules', 'Vincent'}, { limit = 100 }) - ['Jules', 'Vincent', 5, 'What do they call a `Whopper`?'] ... -- Select all messages from Vincent to The Wolf -space.index['primary']:select({'Vincent', 'The Wolf!'}, { limit = 100 }) +space.index['primary']:select({'Vincent', 'The Wolf!'}) --- - - ['Vincent', 'The Wolf!', 0, 'A please would be nice.'] - ['Vincent', 'The Wolf!', 1, 'I said a please would be nice.'] @@ -221,7 +221,7 @@ space.index['primary']:select({'Vincent', 'The Wolf!'}, { limit = 100 }) of this. So, pretty please... with sugar on top. Clean the fucking car.'] ... -- Select all messages from The Wolf to Vincent -space.index['primary']:select({'The Wolf!', 'Vincent'}, { limit = 100 }) +space.index['primary']:select({'The Wolf!', 'Vincent'}) --- - - ['The Wolf!', 'Vincent', 0, 'Jimmie, lead the way. Boys, get to work.'] - ['The Wolf!', 'Vincent', 1, 'Come again?'] @@ -233,7 +233,7 @@ space.index['primary']:select({'The Wolf!', 'Vincent'}, { limit = 100 }) barking orders at me.'] ... -- Select all Vincent messages -space.index['primary']:select({'Vincent'}, { limit = 100 }) +space.index['primary']:select({'Vincent'}) --- - - ['Vincent', 'Jules', 0, 'Do you know what they call a - a - a Quarter Pounder with cheese in Paris?'] @@ -276,7 +276,7 @@ space:update({'Updated', 'The Wolf!', 1}, {{ '=', 0, 'Vincent'}, { '#', 4, 1 }}) - ['Vincent', 'The Wolf!', 1, 'I said a please would be nice.'] ... -- Checking Vincent's last messages -space.index['primary']:select({'Vincent', 'The Wolf!'}, { limit = 100 }) +space.index['primary']:select({'Vincent', 'The Wolf!'}) --- - - ['Vincent', 'The Wolf!', 1, 'I said a please would be nice.'] - ['Vincent', 'The Wolf!', 2, 'If I`m curt with you it`s because time is a factor. @@ -284,7 +284,7 @@ space.index['primary']:select({'Vincent', 'The Wolf!'}, { limit = 100 }) of this. So, pretty please... with sugar on top. Clean the fucking car.'] ... -- Checking The Wolf's last messages -space.index['primary']:select({'The Wolf!', 'Vincent'}, { limit = 100 }) +space.index['primary']:select({'The Wolf!', 'Vincent'}) --- - - ['The Wolf!', 'Vincent', 1, 'Come again?'] - ['The Wolf!', 'Vincent', 2, 'Get it straight buster - I`m not here to say please, @@ -318,7 +318,7 @@ space:update({'Vincent', 'The Wolf!', 1}, {{'=', 3, '<ooops>'}}) - ['Vincent', 'The Wolf!', 1, '<ooops>'] ... -- Checking Vincent's last messages -space.index['primary']:select({'Vincent', 'The Wolf!'}, { limit = 100 }) +space.index['primary']:select({'Vincent', 'The Wolf!'}) --- - - ['Vincent', 'The Wolf!', 1, '<ooops>'] - ['Vincent', 'The Wolf!', 2, 'If I`m curt with you it`s because time is a factor. @@ -326,7 +326,7 @@ space.index['primary']:select({'Vincent', 'The Wolf!'}, { limit = 100 }) of this. So, pretty please... with sugar on top. Clean the fucking car.'] ... -- Checking The Wolf's last messages -space.index['primary']:select({'The Wolf!', 'Vincent'}, { limit = 100 }) +space.index['primary']:select({'The Wolf!', 'Vincent'}) --- - - ['The Wolf!', 'Vincent', 1, '<ooops>'] - ['The Wolf!', 'Vincent', 2, 'Get it straight buster - I`m not here to say please, diff --git a/test/big/tree_pk_multipart.test.lua b/test/big/tree_pk_multipart.test.lua index a049313356771c30bbced7c4d1d928312a47a66f..942f30c246abdf59a13ba9d03501f1a2117c8e4d 100644 --- a/test/big/tree_pk_multipart.test.lua +++ b/test/big/tree_pk_multipart.test.lua @@ -55,19 +55,19 @@ space.index['primary']:get{'The Wolf!', 'Vincent', 3} space.index['primary']:get{'Vincent', 'The Wolf!', 2} -- Select all messages from Vincent to Jules -space.index['primary']:select({'Vincent', 'Jules'}, { limit = 100 }) +space.index['primary']:select({'Vincent', 'Jules'}) -- Select all messages from Jules to Vincent -space.index['primary']:select({'Jules', 'Vincent'}, { limit = 100 }) +space.index['primary']:select({'Jules', 'Vincent'}) -- Select all messages from Vincent to The Wolf -space.index['primary']:select({'Vincent', 'The Wolf!'}, { limit = 100 }) +space.index['primary']:select({'Vincent', 'The Wolf!'}) -- Select all messages from The Wolf to Vincent -space.index['primary']:select({'The Wolf!', 'Vincent'}, { limit = 100 }) +space.index['primary']:select({'The Wolf!', 'Vincent'}) -- Select all Vincent messages -space.index['primary']:select({'Vincent'}, { limit = 100 }) +space.index['primary']:select({'Vincent'}) -- -- Delete test @@ -81,9 +81,9 @@ space:delete{'Vincent', 'The Wolf!', 0} space:update({'Vincent', 'The Wolf!', 1}, {{ '=', 0, 'Updated' }, {'=', 4, 'New'}}) space:update({'Updated', 'The Wolf!', 1}, {{ '=', 0, 'Vincent'}, { '#', 4, 1 }}) -- Checking Vincent's last messages -space.index['primary']:select({'Vincent', 'The Wolf!'}, { limit = 100 }) +space.index['primary']:select({'Vincent', 'The Wolf!'}) -- Checking The Wolf's last messages -space.index['primary']:select({'The Wolf!', 'Vincent'}, { limit = 100 }) +space.index['primary']:select({'The Wolf!', 'Vincent'}) -- try to delete nonexistent message space:delete{'Vincent', 'The Wolf!', 3} @@ -99,9 +99,9 @@ space:update({'The Wolf!', 'Vincent', 1}, {{'=', 3, '<ooops>'}}) space:update({'Vincent', 'The Wolf!', 1}, {{'=', 3, '<ooops>'}}) -- Checking Vincent's last messages -space.index['primary']:select({'Vincent', 'The Wolf!'}, { limit = 100 }) +space.index['primary']:select({'Vincent', 'The Wolf!'}) -- Checking The Wolf's last messages -space.index['primary']:select({'The Wolf!', 'Vincent'}, { limit = 100 }) +space.index['primary']:select({'The Wolf!', 'Vincent'}) -- try to update a nonexistent message space:update({'Vincent', 'The Wolf!', 3}, {{'=', 3, '<ooops>'}}) diff --git a/test/big/tree_variants.result b/test/big/tree_variants.result index 2df5f482ff4b7a211bef0522351ce9def1c29754..95bfdf7e226eabf6f6beb0543ed1cfc1c10b0a28 100644 --- a/test/big/tree_variants.result +++ b/test/big/tree_variants.result @@ -70,21 +70,21 @@ space.index['i1']:select{2} --- - - [2, 2, 200, 'Joe', 'Sixpack', 'Drinks', 'Carlsberg', 'bar', 2002] ... -space.index[2]:select({300}, { limit = 100 }) +space.index[2]:select({300}) --- - - [3, 3, 300, 'Joe', 'Sixpack', 'Drinks', 'Corona Extra', 'bar', 2003] - [4, 4, 300, 'Joe', 'Sixpack', 'Drinks', 'Stella Artois', 'bar', 2004] - [5, 5, 300, 'Joe', 'Sixpack', 'Drinks', 'Miller Genuine Draft', 'bar', 2005] ... -#space.index['i3']:select({'Joe', 'Sixpack'}, { limit = 100 }) +#space.index['i3']:select({'Joe', 'Sixpack'}) --- - 6 ... -#space.index['i3']:select('John', { limit = 100 }) +#space.index['i3']:select('John') --- - 4 ... -#space.index['i4']:select('A Pipe', { limit = 100 }) +#space.index['i4']:select('A Pipe') --- - 1 ... @@ -140,14 +140,14 @@ space.index['i1']:select{6} --- - - [6, 6, 400, 'John', 'Smoker', 'Hits', 'A Pipe', 'foo', 2006] ... -space.index['i2']:select(400ULL, { limit = 100 }) +space.index['i2']:select(400ULL) --- - - [6, 6, 400, 'John', 'Smoker', 'Hits', 'A Pipe', 'foo', 2006] - [7, 7, 400, 'John', 'Smoker', 'Hits', 'A Bong', 'foo', 2007] - [8, 8, 400, 'John', 'Smoker', 'Rolls', 'A Joint', 'foo', 2008] - [9, 9, 400, 'John', 'Smoker', 'Rolls', 'A Blunt', 'foo', 2009] ... -space.index['i2']:select(400, { limit = 100}) +space.index['i2']:select(400) --- - - [6, 6, 400, 'John', 'Smoker', 'Hits', 'A Pipe', 'foo', 2006] - [7, 7, 400, 'John', 'Smoker', 'Hits', 'A Bong', 'foo', 2007] diff --git a/test/big/tree_variants.test.lua b/test/big/tree_variants.test.lua index a7d4899982539fc2b64c35d7850bc82514226b65..046480ed5527cc135b343b99e92778bb5b17577a 100644 --- a/test/big/tree_variants.test.lua +++ b/test/big/tree_variants.test.lua @@ -20,10 +20,10 @@ space:insert{9, 9, 400, 'John', 'Smoker', 'Rolls', 'A Blunt', 'foo', 2009} space.index['primary']:get{1} space.index['i1']:select{2} -space.index[2]:select({300}, { limit = 100 }) -#space.index['i3']:select({'Joe', 'Sixpack'}, { limit = 100 }) -#space.index['i3']:select('John', { limit = 100 }) -#space.index['i4']:select('A Pipe', { limit = 100 }) +space.index[2]:select({300}) +#space.index['i3']:select({'Joe', 'Sixpack'}) +#space.index['i3']:select('John') +#space.index['i4']:select('A Pipe') {space.index['i4']:select{'Miller Genuine Draft', 'Drinks'}} space.index['i5']:select{2007} space.index[6]:select{'Miller Genuine Draft', 'Drinks'} @@ -40,8 +40,8 @@ space:insert{9, 9ULL, 400ULL, 'John', 'Smoker', 'Rolls', 'A Blunt', 'foo', 2009} space.index['i1']:select{6ULL} space.index['i1']:select{6} -space.index['i2']:select(400ULL, { limit = 100 }) -space.index['i2']:select(400, { limit = 100}) +space.index['i2']:select(400ULL) +space.index['i2']:select(400) space:select{} diff --git a/test/wal/lua.result b/test/wal/lua.result index 181dc461e4311e8c4edf510250c931ea3fc83fef..599b03be4b8dec46cfad4b09d7edad9ad98a8a13 100644 --- a/test/wal/lua.result +++ b/test/wal/lua.result @@ -37,7 +37,7 @@ space:truncate() for i = 1, 100000, 1 do space:insert{tostring(i), i} end --- ... -local t1 = space.index['secondary']:select({}, { limit = 100000 }) +local t1 = space.index['secondary']:select() --- ... space:drop() diff --git a/test/wal/lua.test.lua b/test/wal/lua.test.lua index a7e6e59b91be2dd15eaf8ec7d45da879d453c403..6895ce5339cb00824696635b3ae1d9b844e7daae 100644 --- a/test/wal/lua.test.lua +++ b/test/wal/lua.test.lua @@ -27,7 +27,7 @@ space:truncate() -- 5.4 -- for i = 1, 100000, 1 do space:insert{tostring(i), i} end -local t1 = space.index['secondary']:select({}, { limit = 100000 }) +local t1 = space.index['secondary']:select() space:drop() --