File tree Expand file tree Collapse file tree 25 files changed +154
-135
lines changed Expand file tree Collapse file tree 25 files changed +154
-135
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,6 @@ def start
102
102
# Conversation.new(user, "admin")
103
103
#
104
104
# @param [ Auth::User ] user The user to converse about.
105
- # @param [ String ] database The database to authenticate against.
106
105
#
107
106
# @since 2.0.0
108
107
def initialize ( user )
Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ class InvalidBulkOperation < Error
25
25
# @example Instantiate the exception.
26
26
# Mongo::Error::InvalidBulkOperation.new(name)
27
27
#
28
- # @param [ String ] name The attempted operation name.
28
+ # @param [ String ] type The bulk operation type.
29
+ # @param [ Hash ] operation The bulk operation.
29
30
#
30
31
# @since 2.0.0
31
32
def initialize ( type , operation )
Original file line number Diff line number Diff line change @@ -31,12 +31,13 @@ module Operation
31
31
# :db_name => 'test_db'
32
32
# })
33
33
#
34
- # @param [ Hash ] spec The specifications for the operation.
34
+ # Initialization:
35
+ # param [ Hash ] spec The specifications for the operation.
35
36
#
36
- # @ option spec :selector [ Hash ] The aggregate selector.
37
- # @ option spec :db_name [ String ] The name of the database on which
38
- # the operation should be executed.
39
- # @ option spec :options [ Hash ] Options for the aggregate command.
37
+ # option spec :selector [ Hash ] The aggregate selector.
38
+ # option spec :db_name [ String ] The name of the database on which
39
+ # the operation should be executed.
40
+ # option spec :options [ Hash ] Options for the aggregate command.
40
41
#
41
42
# @since 2.0.0
42
43
class Aggregate
Original file line number Diff line number Diff line change @@ -20,14 +20,13 @@ module Operation
20
20
# @example Create the command operation.
21
21
# Mongo::Operation::Command.new({ :selector => { :isMaster => 1 } })
22
22
#
23
- # @note A command is actually a query on the virtual '$cmd' collection.
23
+ # Initialization:
24
+ # param [ Hash ] spec The specifications for the command.
24
25
#
25
- # @param [ Hash ] spec The specifications for the command.
26
- #
27
- # @option spec :selector [ Hash ] The command selector.
28
- # @option spec :db_name [ String ] The name of the database on which
26
+ # option spec :selector [ Hash ] The command selector.
27
+ # option spec :db_name [ String ] The name of the database on which
29
28
# the command should be executed.
30
- # @ option spec :options [ Hash ] Options for the command.
29
+ # option spec :options [ Hash ] Options for the command.
31
30
#
32
31
# @since 2.0.0
33
32
class Command
Original file line number Diff line number Diff line change @@ -20,9 +20,10 @@ module Operation
20
20
# @example Create the kill cursors operation.
21
21
# Mongo::Operation::KillCursor.new({ :cursor_ids => [1, 2] })
22
22
#
23
- # @param [ Hash ] spec The specifications for the operation.
23
+ # Initialization:
24
+ # param [ Hash ] spec The specifications for the operation.
24
25
#
25
- # @ option spec :cursor_ids [ Array ] The ids of cursors to kill.
26
+ # option spec :cursor_ids [ Array ] The ids of cursors to kill.
26
27
#
27
28
# @since 2.0.0
28
29
class KillCursors
Original file line number Diff line number Diff line change @@ -33,12 +33,13 @@ module Operation
33
33
# :db_name => 'test_db'
34
34
# })
35
35
#
36
- # @param [ Hash ] spec The specifications for the operation.
36
+ # Initialization:
37
+ # param [ Hash ] spec The specifications for the operation.
37
38
#
38
- # @ option spec :selector [ Hash ] The map reduce selector.
39
- # @ option spec :db_name [ String ] The name of the database on which
40
- # the operation should be executed.
41
- # @ option spec :options [ Hash ] Options for the map reduce command.
39
+ # option spec :selector [ Hash ] The map reduce selector.
40
+ # option spec :db_name [ String ] The name of the database on which
41
+ # the operation should be executed.
42
+ # option spec :options [ Hash ] Options for the map reduce command.
42
43
#
43
44
# @since 2.0.0
44
45
class MapReduce
Original file line number Diff line number Diff line change @@ -21,11 +21,12 @@ module Read
21
21
# @example Create the collection names operation.
22
22
# Read::CollectionNames.new(:db_name => 'test-db')
23
23
#
24
- # @param [ Hash ] spec The specifications for the collection names operation.
24
+ # Initialization:
25
+ # param [ Hash ] spec The specifications for the collection names operation.
25
26
#
26
- # @ option spec :db_name [ String ] The name of the database whose collection
27
- # names is requested.
28
- # @ option spec :options [ Hash ] Options for the operation.
27
+ # option spec :db_name [ String ] The name of the database whose collection
28
+ # names is requested.
29
+ # option spec :options [ Hash ] Options for the operation.
29
30
#
30
31
# @since 2.0.0
31
32
class CollectionsInfo
Original file line number Diff line number Diff line change @@ -26,14 +26,15 @@ module Read
26
26
# :coll_name => 'test_coll'
27
27
# })
28
28
#
29
- # @param [ Hash ] spec The specifications for the operation.
29
+ # Initialization:
30
+ # param [ Hash ] spec The specifications for the operation.
30
31
#
31
- # @ option spec :to_return [ Integer ] The number of results to return.
32
- # @ option spec :cursor_id [ Integer ] The id of the cursor.
33
- # @ option spec :db_name [ String ] The name of the database on which
34
- # the operation should be executed.
35
- # @ option spec :coll_name [ String ] The name of the collection on which
36
- # the operation should be executed.
32
+ # option spec :to_return [ Integer ] The number of results to return.
33
+ # option spec :cursor_id [ Integer ] The id of the cursor.
34
+ # option spec :db_name [ String ] The name of the database on which
35
+ # the operation should be executed.
36
+ # option spec :coll_name [ String ] The name of the collection on which
37
+ # the operation should be executed.
37
38
#
38
39
# @since 2.0.0
39
40
class GetMore
Original file line number Diff line number Diff line change @@ -23,10 +23,11 @@ module Read
23
23
# @example Instantiate the operation.
24
24
# Read::Indexes.new(:db_name => 'test', :coll_name => 'test_coll')
25
25
#
26
- # @param [ Hash ] spec The specifications for the insert.
26
+ # Initialization:
27
+ # param [ Hash ] spec The specifications for the insert.
27
28
#
28
- # @ option spec :db_name [ String ] The name of the database.
29
- # @ option spec :coll_name [ String ] The name of the collection.
29
+ # option spec :db_name [ String ] The name of the database.
30
+ # option spec :coll_name [ String ] The name of the collection.
30
31
#
31
32
# @since 2.0.0
32
33
class Indexes
Original file line number Diff line number Diff line change @@ -25,11 +25,12 @@ module Read
25
25
#
26
26
# @note A command is actually a query on the virtual '$cmd' collection.
27
27
#
28
- # @param [ Hash ] spec The specifications for the command.
28
+ # Initialization:
29
+ # param [ Hash ] spec The specifications for the command.
29
30
#
30
- # @ option spec :db_name [ String ] The name of the database whose list of
31
- # collection names is requested.
32
- # @ option spec :options [ Hash ] Options for the command.
31
+ # option spec :db_name [ String ] The name of the database whose list of
32
+ # collection names is requested.
33
+ # option spec :options [ Hash ] Options for the command.
33
34
#
34
35
# @since 2.0.0
35
36
class ListCollections
Original file line number Diff line number Diff line change @@ -25,13 +25,14 @@ module Read
25
25
#
26
26
# @note A command is actually a query on the virtual '$cmd' collection.
27
27
#
28
- # @param [ Hash ] spec The specifications for the command.
28
+ # Initialization:
29
+ # param [ Hash ] spec The specifications for the command.
29
30
#
30
- # @ option spec :coll_name [ Hash ] The name of the collection whose index
31
- # info is requested.
32
- # @ option spec :db_name [ String ] The name of the database on which
33
- # the command should be executed.
34
- # @ option spec :options [ Hash ] Options for the command.
31
+ # option spec :coll_name [ Hash ] The name of the collection whose index
32
+ # info is requested.
33
+ # option spec :db_name [ String ] The name of the database on which
34
+ # the command should be executed.
35
+ # option spec :options [ Hash ] Options for the command.
35
36
#
36
37
# @since 2.0.0
37
38
class ListIndexes
Original file line number Diff line number Diff line change @@ -26,14 +26,15 @@ module Read
26
26
# :options => { :limit => 2 }
27
27
# })
28
28
#
29
- # @param [ Hash ] spec The specifications for the query.
29
+ # Initialization:
30
+ # param [ Hash ] spec The specifications for the query.
30
31
#
31
- # @ option spec :selector [ Hash ] The query selector.
32
- # @ option spec :db_name [ String ] The name of the database on which
33
- # the query should be run.
34
- # @ option spec :coll_name [ String ] The name of the collection on which
35
- # the query should be run.
36
- # @ option spec :options [ Hash ] Options for the query.
32
+ # option spec :selector [ Hash ] The query selector.
33
+ # option spec :db_name [ String ] The name of the database on which
34
+ # the query should be run.
35
+ # option spec :coll_name [ String ] The name of the collection on which
36
+ # the query should be run.
37
+ # option spec :options [ Hash ] Options for the query.
37
38
#
38
39
# @since 2.0.0
39
40
class Query
Original file line number Diff line number Diff line change @@ -31,19 +31,20 @@ module Write
31
31
# :write_concern => write_concern
32
32
# })
33
33
#
34
- # @param [ Hash ] spec The specifications for the delete.
34
+ # Initialization:
35
+ # param [ Hash ] spec The specifications for the delete.
35
36
#
36
- # @ option spec :deletes [ Array ] The delete documents.
37
- # @ option spec :db_name [ String ] The name of the database on which
38
- # the delete should be executed.
39
- # @ option spec :coll_name [ String ] The name of the collection on which
40
- # the delete should be executed.
41
- # @ option spec :write_concern [ Mongo::WriteConcern ] The write concern
42
- # for this operation.
43
- # @ option spec :ordered [ true, false ] Whether the operations should be
44
- # executed in order.
45
- # @ option spec :options [Hash] Options for the command, if it ends up being a
46
- # write command.
37
+ # option spec :deletes [ Array ] The delete documents.
38
+ # option spec :db_name [ String ] The name of the database on which
39
+ # the delete should be executed.
40
+ # option spec :coll_name [ String ] The name of the collection on which
41
+ # the delete should be executed.
42
+ # option spec :write_concern [ Mongo::WriteConcern ] The write concern
43
+ # for this operation.
44
+ # option spec :ordered [ true, false ] Whether the operations should be
45
+ # executed in order.
46
+ # option spec :options [Hash] Options for the command, if it ends up being a
47
+ # write command.
47
48
#
48
49
# @since 2.0.0
49
50
class BulkDelete
Original file line number Diff line number Diff line change @@ -33,16 +33,17 @@ module Write
33
33
# :ordered => false
34
34
# })
35
35
#
36
- # @param [ Hash ] spec The specifications for the insert.
36
+ # Initialization:
37
+ # param [ Hash ] spec The specifications for the insert.
37
38
#
38
- # @ option spec :documents [ Array ] The documents to insert.
39
- # @ option spec :db_name [ String ] The name of the database.
40
- # @ option spec :coll_name [ String ] The name of the collection.
41
- # @ option spec :write_concern [ Mongo::WriteConcern ] The write concern.
42
- # @ option spec :ordered [ true, false ] Whether the operations should be
43
- # executed in order.
44
- # @ option spec :options [ Hash ] Options for the command, if it ends up being a
45
- # write command.
39
+ # option spec :documents [ Array ] The documents to insert.
40
+ # option spec :db_name [ String ] The name of the database.
41
+ # option spec :coll_name [ String ] The name of the collection.
42
+ # option spec :write_concern [ Mongo::WriteConcern ] The write concern.
43
+ # option spec :ordered [ true, false ] Whether the operations should be
44
+ # executed in order.
45
+ # option spec :options [ Hash ] Options for the command, if it ends up being a
46
+ # write command.
46
47
#
47
48
# @since 2.0.0
48
49
class BulkInsert
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ class Result < Operation::Result
37
37
# Result.new(replies, inserted_ids)
38
38
#
39
39
# @param [ Protocol::Reply ] replies The wire protocol replies.
40
- # @params [ Array<Object> ] ids The ids of the inserted documents.
40
+ # @param [ Array<Object> ] ids The ids of the inserted documents.
41
41
#
42
42
# @since 2.0.0
43
43
def initialize ( replies , ids )
@@ -88,7 +88,7 @@ class LegacyResult < Operation::Result
88
88
# Result.new(replies, inserted_ids)
89
89
#
90
90
# @param [ Protocol::Reply ] replies The wire protocol replies.
91
- # @params [ Array<Object> ] ids The ids of the inserted documents.
91
+ # @param [ Array<Object> ] ids The ids of the inserted documents.
92
92
#
93
93
# @since 2.0.0
94
94
def initialize ( replies , ids )
Original file line number Diff line number Diff line change @@ -39,18 +39,19 @@ module Write
39
39
# :ordered => false
40
40
# })
41
41
#
42
- # @param [ Hash ] spec The specifications for the update.
42
+ # Initialization:
43
+ # param [ Hash ] spec The specifications for the update.
43
44
#
44
- # @ option spec :updates [ Array ] The update documents.
45
- # @ option spec :db_name [ String ] The name of the database on which
46
- # the query should be run.
47
- # @ option spec :coll_name [ String ] The name of the collection on which
48
- # the query should be run.
49
- # @ option spec :write_concern [ Mongo::WriteConcern ] The write concern.
50
- # @ option spec :ordered [ true, false ] Whether the operations should be
51
- # executed in order.
52
- # @ option spec :options [ Hash ] Options for the command, if it ends up being a
53
- # write command.
45
+ # option spec :updates [ Array ] The update documents.
46
+ # option spec :db_name [ String ] The name of the database on which
47
+ # the query should be run.
48
+ # option spec :coll_name [ String ] The name of the collection on which
49
+ # the query should be run.
50
+ # option spec :write_concern [ Mongo::WriteConcern ] The write concern.
51
+ # option spec :ordered [ true, false ] Whether the operations should be
52
+ # executed in order.
53
+ # option spec :options [ Hash ] Options for the command, if it ends up being a
54
+ # write command.
54
55
#
55
56
# @since 2.0.0
56
57
class BulkUpdate
Original file line number Diff line number Diff line change @@ -30,14 +30,15 @@ module Write
30
30
# :index_name => 'name_1_age_-1'
31
31
# })
32
32
#
33
- # @param [ Hash ] spec The specifications for the insert.
33
+ # Initialization:
34
+ # param [ Hash ] spec The specifications for the insert.
34
35
#
35
- # @ option spec :index [ Hash ] The index spec to create.
36
- # @ option spec :db_name [ String ] The name of the database.
37
- # @ option spec :coll_name [ String ] The name of the collection.
38
- # @ option spec :index_name [ String ] The name of the index.
39
- # @ option spec :options [ Hash ] Options for the command, if it ends up being a
40
- # write command.
36
+ # option spec :index [ Hash ] The index spec to create.
37
+ # option spec :db_name [ String ] The name of the database.
38
+ # option spec :coll_name [ String ] The name of the collection.
39
+ # option spec :index_name [ String ] The name of the index.
40
+ # option spec :options [ Hash ] Options for the command, if it ends up being a
41
+ # write command.
41
42
#
42
43
# @since 2.0.0
43
44
class CreateIndex
Original file line number Diff line number Diff line change @@ -22,10 +22,11 @@ module Write
22
22
# @example Initialize the operation.
23
23
# Write::CreateUser.new(:db_name => 'test', :user => user)
24
24
#
25
- # @param [ Hash ] spec The specifications for the create.
25
+ # Initialization:
26
+ # param [ Hash ] spec The specifications for the create.
26
27
#
27
- # @ option spec :user [ Auth::User ] The user to create.
28
- # @ option spec :db_name [ String ] The name of the database.
28
+ # option spec :user [ Auth::User ] The user to create.
29
+ # option spec :db_name [ String ] The name of the database.
29
30
#
30
31
# @since 2.0.0
31
32
class CreateUser
Original file line number Diff line number Diff line change @@ -31,19 +31,20 @@ module Write
31
31
# :write_concern => write_concern
32
32
# })
33
33
#
34
- # @param [ Hash ] spec The specifications for the delete.
34
+ # Initialization:
35
+ # param [ Hash ] spec The specifications for the delete.
35
36
#
36
- # @ option spec :delete [ Hash ] The delete document.
37
- # @ option spec :db_name [ String ] The name of the database on which
38
- # the delete should be executed.
39
- # @ option spec :coll_name [ String ] The name of the collection on which
40
- # the delete should be executed.
41
- # @ option spec :write_concern [ Mongo::WriteConcern ] The write concern
42
- # for this operation.
43
- # @ option spec :ordered [ true, false ] Whether the operations should be
44
- # executed in order.
45
- # @ option spec :options [Hash] Options for the command, if it ends up being a
46
- # write command.
37
+ # option spec :delete [ Hash ] The delete document.
38
+ # option spec :db_name [ String ] The name of the database on which
39
+ # the delete should be executed.
40
+ # option spec :coll_name [ String ] The name of the collection on which
41
+ # the delete should be executed.
42
+ # option spec :write_concern [ Mongo::WriteConcern ] The write concern
43
+ # for this operation.
44
+ # option spec :ordered [ true, false ] Whether the operations should be
45
+ # executed in order.
46
+ # option spec :options [Hash] Options for the command, if it ends up being a
47
+ # write command.
47
48
#
48
49
# @since 2.0.0
49
50
class Delete
You can’t perform that action at this time.
0 commit comments