Flop.Cursor.get_cursor_from_map
You're seeing just the function
get_cursor_from_map
, go back to Flop.Cursor module for more information.
This function is deprecated. Use Flop.Cursor.get_cursor_from_node/2 instead.
Specs
Takes a map or a struct and the order_by
field list and returns the cursor
value.
See also Flop.Cursor.get_cursor_from_edge/2
and
Flop.Cursor.get_cursor_from_node/2
.
iex> record = %{id: 20, name: "George", age: 62}
iex>
iex> Flop.Cursor.get_cursor_from_map(record, [:id])
%{id: 20}
iex> Flop.Cursor.get_cursor_from_map(record, [:name, :age])
%{age: 62, name: "George"}