From daa4b23d9b954112a9cee1848b01d0e2102121b8 Mon Sep 17 00:00:00 2001 From: Joe Pearson Date: Thu, 4 Mar 2021 13:52:27 -0800 Subject: [PATCH] Correct typespec --- lib/mongo.ex | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/mongo.ex b/lib/mongo.ex index 6c5aa9bb..9f7187d1 100644 --- a/lib/mongo.ex +++ b/lib/mongo.ex @@ -1193,12 +1193,14 @@ defmodule Mongo do end @doc """ - Convenient function to creates new indexes in the collection `coll`. The `indexes` parameter - is a keyword list with all options for creating indexes in the MongoDB. - See [options](https://docs.mongodb.com/manual/reference/command/createIndexes/#dbcmd.createIndexes) about the - details of each parameter. + Convenient function to creates new indexes in the collection `coll`. The `indexes` parameter is a + list with all options for creating indexes in the MongoDB. + + See + [options](https://docs.mongodb.com/manual/reference/command/createIndexes/#dbcmd.createIndexes) + about the details of each parameter. """ - @spec create_indexes(GenServer.server, String.t, Keyword.t, Keyword.t) :: :ok | {:error, Mongo.Error.t} + @spec create_indexes(GenServer.server, String.t, [Keyword.t], Keyword.t) :: :ok | {:error, Mongo.Error.t} def create_indexes(topology_pid, coll, indexes, opts \\ []) do cmd = [createIndexes: coll, indexes: indexes] with {:ok, _} <- Mongo.issue_command(topology_pid, cmd, :write, opts) do