I am now using MongoTalk for a project and I wanted to use distinct.

But there seems to be no support in the version that I do have.

So, I had a look under the hood on how the driver worked.��

I came up with this:

mongo := Mongo default open.
db := mongo databaseNamed: 'somedb'.

aCommandDict := { ��'distinct' -> 'somecollection'. 'key' -> 'XYZ'. 'query' -> nil } asDictionary.

reply := db command: aCommandDict.

(CollectionValidation on: reply) isOK.

distinct := ��reply at: #values.


It would be nice to have some support for the distinct command in MongoTalk.

Especially in order to populate dropboxes etc with choices.

I have been looking at Voyage too but the data is not produced by my application, so there is little use for me to have #instanceOf fields etc.

I will also need aggregation commands on my data set.

Are these things somewhere to be found or do I have to look into how the shell does things and move from there?

TIA

Phil