Re: [Pharo-dev] MongoTalk UpdateOperation and options. How to?

2015-05-21 Thread philippeback
I've been able to get it working by modifying the flags in the wire protocol
handling.

There is a version of MongoTalk I do use here: 

http://smalltalkhub.com/#!/~philippeback/HOExtras/packages/ConfigurationOfMongoTalk

This is drifting a bit from the official one and maybe I should integrate
things back.

What I have in it is some extra doc comments...

I think that it is important to beef up the support for MongoTalk as we are
severely lacking on that area vs other platforms.

This includes:

* support for replicasets (this is handled in client code)
* support for GridFS (nothing in MongoTalk)

GridFS shouldn't be too hard but replicatsets is another matter. I guess
I'll learn a bit.

Phil





--
View this message in context: 
http://forum.world.st/MongoTalk-UpdateOperation-and-options-How-to-tp4827731p4827851.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.



[Pharo-dev] MongoTalk UpdateOperation and options. How to?

2015-05-20 Thread p...@highoctane.be
In MongoTalk, there is UpdateOperation.

But I can't find how one can do an update with options.

http://docs.mongodb.org/manual/reference/method/db.collection.update/

I see

Mongoupdate: origDictionary with: newDictionary collection: aString

(UpdateOperation
collection: aString
id: self nextRequestID
stream: stream
originalObject: origDictionary
newObject: newDictionary) write

But there is no room for options

I tried to do it with commands but wasn't able to figure out how.

In MongoShell,

db.runCommand({
  update:Message,
  query:{},
  updates: [{$set: {READ:true} }],
  options: {multi:true}
  })

gives me missing q parameter


Anyone knowing how to do this?

I've also done this code:

| query what |

query := { } asDictionary.
what := { 'READ' - true } asDictionary.

Mapless currentRepository database beLogging.

(Mapless currentRepository collection: Message) - basically one gets
a Mongoclient doing the updata:with:
update: query
with: {'$set' - what } asDictionary.


Thanks for any help :-)

Phil