tc / RMongo

R client to interface with MongoDB
102 stars 34 forks source link

"port" and "host" argument to mongoDbConnect do not do anything #3

Closed crayola closed 13 years ago

crayola commented 13 years ago

Seems like an important feature.. As it, in my understanding, RMongo can only connect to a local database on port 27017.

tc commented 13 years ago

Hi, localhost and 27017 are the default values, you can override them in the 2nd/3rd arguments: ?mongoDbConnect:

Connecting to a MongoDB database

Description Creates a RMongo object to use with querying and inserting methods.

Usage mongoDbConnect(dbName, host="localhost", port=27017)

crayola commented 13 years ago

I might be doing something wrong or using an obsolete version. But this is the function that I have in my installation.

mongoDbConnect <- function(dbName, host="localhost", port=27017){ rmongo <- new("RMongo", javaMongo = .jnew("com/quid/RMongo", dbName)) rmongo }

As is clear from the function definition, the "host" and "port" arguments are not actually used by mongoDbConnect.

tc commented 13 years ago

You are definitely correct. I'll push a fix asap. Thanks for finding this :)

tc commented 13 years ago

Made a commit to https://github.com/quid/RMongo/commit/708e2e06652557a4d9e620b4e2393d8c8040aa1e

Uploaded new version (0.18) with the fix. Let me know if you find any other problems!

crayola commented 13 years ago

Thanks for the very quick update! Great work. I'll let you know if I find anything else.