Implements 'scan' command which receives three paramaters
table: table name
options: Erlang proplist to specify scan options.
ref: Erlang reference to distinguish rows from multiple scans
API returns ok after starting scan asyncronously. It returns each rows
with {Ref, row, [ColumnList]} messages for each cells. If there is an
error occures during scan, it sends {Ref, error, Name, Msg} and
terminates scan. If all rows are successfully returned, it sends {Ref, done} message.
note: This PR implements proof-of-concept mechanism of scan command. Any comments/reviews/feedbacks are welcome. Here's some ideas
{Ref, {error, Name, Msg}} might be better than {Ref, error, Name, Msg} because we can use single error handling function for both scan and get. Same for other messages.
It sends single message for each rows, and there might be performance problem when handling multiple small rows. {Ref, row, [Rows]} might be better
There are some redundent messages on row message. For example, we don't need to specify table name because we know it already.
Implements 'scan' command which receives three paramaters
API returns
ok
after starting scan asyncronously. It returns each rows with{Ref, row, [ColumnList]}
messages for each cells. If there is an error occures during scan, it sends{Ref, error, Name, Msg}
and terminates scan. If all rows are successfully returned, it sends{Ref, done}
message.note: This PR implements proof-of-concept mechanism of
scan
command. Any comments/reviews/feedbacks are welcome. Here's some ideas{Ref, {error, Name, Msg}}
might be better than{Ref, error, Name, Msg}
because we can use single error handling function for bothscan
andget
. Same for other messages.{Ref, row, [Rows]}
might be better