Re: [expath] MongoDB Module: Working Draft

Hi Hans-Jürgen,

Thanks for your initial feedback (and thanks to others writing me in
private.. If possible, please always write to the list!).

> index management

In my opinion, the addition of these functions would make sense and
should be pretty straightforward (but I can also relate to Dannes'
perspective on this). By the way, right now you can also us
mongodb:command for handling indexes [1].

> mongodb:update / return value

I am not quite sure on this one: If someone is not interested in the
"write result" of an update operation, this result would need to be
explicitly ignored in some way in the XQuery expression. What do you
think would be the most elegant way to write an updating MongoDB query
without returning any result as query output?

> mongodb:find / options
> However, supposing that the XQuery function is equivalent to
> db.collection.find(), the _id field can be suppressed by the "fields" entry
> "_id: 0"

Thanks for the hint! This comment should simply be dropped.

> Later, the spec might perhaps for each mongodb function specify
> the equivalence of functionality provided by the function on one
> hand, and a well-defined MongoDB operation on the other hand

This would be nice indeed. However, my personal experience so far is
that the existing MongoDB API is not as consistent and stable as we
wish it should be, at least not in its current state, so I assume that
if we aligned our module more closely to the current API, we would
arguably need to update this module more frequently as we would like
to.

Surprisingly, I noticed that even the official MongoDB Java driver
(which we and eXist use in our implementations) differs from the shell
API in various aspects, often more than our own driver does, and I'm
not even fully sure if we could map all features of the MongoDB shell
API with this driver.

More feedback is welcome,
Christian

[1] http://docs.mongodb.org/manual/reference/command/createIndexes/#dbcmd.createIndexes

Received on Monday, 9 March 2015 22:16:19 UTC