this is spot on daniel, thanks!
Kelvin Chua
On Mon, Jun 29, 2015 at 6:18 PM, Daniel-Constantin Mierla wrote:
> iirc, the command function can execute any type of operation, including
> insert, try with the command like in the next docs:
>
> - http://docs.mongodb.org/manual/reference/command/
iirc, the command function can execute any type of operation, including
insert, try with the command like in the next docs:
- http://docs.mongodb.org/manual/reference/command/insert/#dbcmd.insert
Cheers,
Daniel
On 29/06/15 11:33, Kelvin Chua wrote:
> according to that documentation, inserting
according to that documentation, inserting a document uses
mongoc_collection_insert (collection, MONGOC_INSERT_NONE, doc, NULL, &error)
which I cannot find in ndb_mongodb.
is this really supported? or should be added to the module?
Kelvin Chua
On Mon, Jun 29, 2015 at 3:40 PM, Daniel-Constantin
Hello,
the exported functions are wrapper around the MongoDB C API, so the
commands should work like described in the API, see:
http://api.mongodb.org/c/current/index.html
Cheers,
Daniel
On 27/06/15 16:46, Kelvin Chua wrote:
>
> quoting it would tell mongo that it is a string, not a function. j
Oh, I see. I just assumed it uses a basic JSON syntax validator that doesn't account for Mongo's quirks.
quoting it would tell mongo that it is a string, not a function. just like
quoting now() in mysql.
for the sake of completeness, i tried it as well but it fails with the same
error message. the whole insert command works on mongo's console so i know
it is correct.
my guess is there is some quirks
I don't think the 'time' value is valid. If it incorporates whitespace, it needs to be: "new Date()".