1. Dmitry Belyaev
  2. emongo

Commits

Dmitry Belyaev  committed 549f4aa

ensure_index usage example

  • Participants
  • Parent commits ee27728
  • Branches default

Comments (0)

Files changed (1)

File src/emongo.erl

View file
 %%------------------------------------------------------------------------------
 %% 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),