MongoDB:如何使用相同的连接连接到不同的数据库?

时间:2016-07-29 13:43:05

标签: ruby mongodb

我希望使用Mongo :: Client对象连接到不同的数据库,就像在命令leadrep中一样。

我正在尝试dput,但它正在给我df1 <- structure(list(Year = c(1999, 1999, 1998), Agent = list(c("abn-amro-nv", "suntrust banks", "wachovia"), c("jp morgan", "abn-amro-nv"), c("ba-corp", "boston bks", "nbd"))), .Names = c("Year", "Agent" ), row.names = c(NA, -3L), class = "data.frame") df2 <- structure(list(Rank = 1:3, Arranger = c("jp morgan", "boston-bank", "suntrust bk"), Share = c(1.2, 1.8, 2.1), Issues = c(7L, 4L, 3L), Year = c(1999L, 1998L, 1999L)), .Names = c("Rank", "Arranger", "Share", "Issues", "Year"), class = "data.frame", row.names = c(NA, -3L))

1 个答案:

答案 0 :(得分:0)

通过API后,我发现它是use方法。