Skip to content

Commit 6d79577

Browse files
committed
Fix legacy upconverters
1 parent 673b79e commit 6d79577

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

lib/mongo/protocol/delete.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ def initialize(collection, filter, options)
143143
# @since 2.1.0
144144
def command
145145
document = BSON::Document.new
146-
document.store(DELETE => collection)
147-
document.store(DELETES => [ BSON::Document.new(Message::Q => filter, Message::LIMIT => limit) ])
148-
document.store(Message::ORDERED => true)
146+
document.store(DELETE, collection)
147+
document.store(DELETES, [ BSON::Document.new(Message::Q => filter, Message::LIMIT => limit) ])
148+
document.store(Message::ORDERED, true)
149149
document
150150
end
151151

lib/mongo/protocol/get_more.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ def initialize(collection, cursor_id, number_to_return)
145145
# @since 2.1.0
146146
def command
147147
document = BSON::Document.new
148-
document.store(GET_MORE => cursor_id)
149-
document.store(Message::BATCH_SIZE => number_to_return)
150-
document.store(Message::COLLECTION => collection)
148+
document.store(GET_MORE, cursor_id)
149+
document.store(Message::BATCH_SIZE, number_to_return)
150+
document.store(Message::COLLECTION, collection)
151151
document
152152
end
153153
end

lib/mongo/protocol/kill_cursors.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ def initialize(collection, cursor_ids)
122122
# @since 2.1.0
123123
def command
124124
document = BSON::Document.new
125-
document.store(KILL_CURSORS => collection)
126-
document.store(CURSORS => cursor_ids)
125+
document.store(KILL_CURSORS, collection)
126+
document.store(CURSORS, cursor_ids)
127127
document
128128
end
129129
end

lib/mongo/protocol/update.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,13 @@ def initialize(collection, filter, update, flags)
187187
def command
188188
document = BSON::Document.new
189189
updates = BSON::Document.new
190-
updates.store(Message::Q => filter)
191-
updates.store(U => update)
192-
updates.store(MULTI => flags.include?(:multi_update))
193-
updates.store(UPSERT => flags.include?(:upsert))
194-
document.store(UPDATE => collection)
195-
document.store(Message::ORDERED => true)
196-
document.store(UPDATES => [ updates ])
190+
updates.store(Message::Q, filter)
191+
updates.store(U, update)
192+
updates.store(MULTI, flags.include?(:multi_update))
193+
updates.store(UPSERT, flags.include?(:upsert))
194+
document.store(UPDATE, collection)
195+
document.store(Message::ORDERED, true)
196+
document.store(UPDATES, [ updates ])
197197
document
198198
end
199199
end

0 commit comments

Comments
 (0)