You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems set_map/2 doesn't work when there's a DateTime in the map. My best guess would be that the fact that DateTime is a map itself messes something up here.
Failing test for test/mutation_test.exs:
test"set_map/2 works with DateTime",%{conn: conn}domap_with_datetime_insert_mutation=%{name: "Alice",identifier: "alice_json",created_at: DateTime.utc_now()}{status,mutation_msg}=ExDgraph.set_map(conn,map_with_datetime_insert_mutation)assertstatus==:okassertmutation_msg.context.aborted==falseend
Which results in:
1) test set_map/2 works with DateTime (MutationTest)
test/mutation_test.exs:121
** (Protocol.UndefinedError) protocol Enumerable not implemented for #DateTime<2019-05-10 21:37:46.845058Z>. This protocol is implemented for: DBConnection.Stream, DBConnection.PrepareStream, HashSet, Range, Map, Function, List, Stream, Date.Range, HashDict, GenEvent.Stream, MapSet, File.Stream, IO.Stream
code: {status, mutation_msg} = ExDgraph.set_map(conn, map_with_datetime_insert_mutation)
stacktrace:
(elixir) /private/tmp/elixir-20190202-21222-1ilp2g0/elixir-1.8.1/lib/elixir/lib/enum.ex:1: Enumerable.impl_for!/1
(elixir) /private/tmp/elixir-20190202-21222-1ilp2g0/elixir-1.8.1/lib/elixir/lib/enum.ex:141: Enumerable.reduce/3
(elixir) lib/enum.ex:3015: Enum.reduce/3
(ex_dgraph) lib/exdgraph/mutation.ex:129: anonymous fn/2 in ExDgraph.Mutation.insert_tmp_uids/1
(stdlib) maps.erl:257: :maps.fold_1/3
(ex_dgraph) lib/exdgraph/mutation.ex:28: ExDgraph.Mutation.set_map/2
test/mutation_test.exs:128: (test)
The text was updated successfully, but these errors were encountered:
It seems
set_map/2
doesn't work when there's aDateTime
in the map. My best guess would be that the fact thatDateTime
is a map itself messes something up here.Failing test for
test/mutation_test.exs
:Which results in:
The text was updated successfully, but these errors were encountered: