Skip to content

Commit

Permalink
bida-2: comment added
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Berezhnoy committed Apr 20, 2016
1 parent eba48ca commit 9ef05f6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bida2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ function bida2_get_users_by_birthday(birthday, userid_offset)
birthday = box.unpack('i', birthday)
userid_offset = box.unpack('i', userid_offset)

--[[
We are using user id as an offset in out tarantool request.
From documentation:
localhost> lua box.select_range(4, 1, 2, '1')
---
- '1': {'1'}
- '2': {'2'}
...
That means, that select_range() function can return users with unexpected birthday => we should filter them out
--]]
local tuples = { box.select_range(0, 1, limit, birthday, userid_offset) }

local result = {}
Expand Down

0 comments on commit 9ef05f6

Please sign in to comment.