Commits

Anonymous committed 549f4aa

ensure_index usage example

  • Participants
  • Parent commits ee27728

Comments (0)

Files changed (1)

File src/emongo.erl

 %%------------------------------------------------------------------------------
 %% ensure index
 %%------------------------------------------------------------------------------
+%% ensure_index(pool, "collection", [{"fieldname1", 1}, {"fieldname2", -1}]).
 ensure_index(PoolId, Collection, Keys) ->
     {Pid, Database, ReqId} = get_pid_pool(PoolId, 1),
     Packet = emongo_packet:ensure_index(Database, Collection, ReqId, Keys),