class StatelyDB::Transaction::Transaction

def begin_list(prefix,

Returns:
  • (Array(Array, ::Stately::Db::ListToken)) - the list of Items and the token

Parameters:
  • sort_direction (Symbol) -- the direction to sort by (:ascending or :descending)
  • sort_property (String) -- the property to sort by
  • limit (Integer) -- the maximum number of items to return
  • prefix (String) -- the prefix to list
def begin_list(prefix,
               limit: 100,
               sort_property: nil,
               sort_direction: :ascending)
  sort_direction = case sort_direction
                   when :ascending
                     0
                   else
                     1
                   end
  req = Stately::Db::TransactionRequest.new(
    begin_list: Stately::Db::TransactionBeginList.new(
      key_path_prefix: String(prefix),
      limit:,
      sort_property:,
      sort_direction:
    )
  )
  do_list_request_response(req)
end