Open stretyak opened 1 year ago
Found a way
to create
mongoc:transaction(MongoConnection,
fun(#{pool := Worker}) ->
Cmd = {<<"create">>, mc_utils:value_to_binary(CollectionName)},
mc_worker_api:command(Worker,Cmd)
end, #{}),
to drop
mongoc:transaction(MongoConnection,
fun(#{pool := Worker}) ->
Cmd = {<<"create">>, mc_utils:value_to_binary(CollectionName)},
mc_worker_api:command(Worker,Cmd)
end, #{}),
I have failed to find a sample could you please add a sample into readme