File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -121,17 +121,17 @@ defmodule Mongo.GridFs.Bucket do
121
121
Mongo . find ( topology_pid , files_collection_name ( bucket ) , filter , opts )
122
122
end
123
123
124
+
124
125
@ doc """
125
- Finds one file document with the file_id as a string
126
+ Finds one file document by ` file_id` specified either as a string or `BSON.ObjectId`.
126
127
"""
128
+ def find_one ( bucket , file_id )
129
+
127
130
@ spec find_one ( Bucket . t , String . t ) :: BSON . document | nil
128
131
def find_one ( % Bucket { } = bucket , file_id ) when is_binary ( file_id ) do
129
132
find_one ( bucket , ObjectId . decode! ( file_id ) )
130
133
end
131
134
132
- @ doc """
133
- Finds one file document with the file_id as an ObjectID-struct
134
- """
135
135
@ spec find_one ( Bucket . t , BSON.ObjectId . t ) :: BSON . document | nil
136
136
def find_one ( % Bucket { topology_pid: topology_pid , opts: opts } = bucket , % BSON.ObjectId { } = oid ) do
137
137
Mongo . find_one ( topology_pid , files_collection_name ( bucket ) , % { "_id" => oid } , opts )
Original file line number Diff line number Diff line change @@ -28,9 +28,12 @@ defmodule Mongodb.Mixfile do
28
28
defp elixirc_paths ( _ ) , do: [ "lib" ]
29
29
30
30
def application ( ) do
31
- [ applications: applications ( Mix . env ) ,
32
- mod: { Mongo.App , [ ] } ,
33
- env: [ ] ]
31
+ [
32
+ applications: applications ( Mix . env ) ,
33
+ env: [ ] ,
34
+ extra_applications: [ :crypto , :ssl ] ,
35
+ mod: { Mongo.App , [ ] }
36
+ ]
34
37
end
35
38
36
39
def applications ( :test ) , do: [ :logger , :connection , :db_connection ]
You can’t perform that action at this time.
0 commit comments