2.1.1 - Any replacement for mongo::DBClientWithCommands::nsGetCollection?

42 views
Skip to first unread message

sptrakesh

unread,
May 13, 2012, 1:58:46 PM5/13/12
to mongodb-user
Hello,

I noticed that the C++ API has removed the nsGetCollection method from
DBClientWithCommands. I did not see any obvious replacement for it.
Is there any, or do I have to parse the full name and replicate what
the built in function was doing?

Thanks
Rakesh

Eliot Horowitz

unread,
May 14, 2012, 1:26:22 AM5/14/12
to mongod...@googlegroups.com
You can do

NamespaceString( "foo.bar" ).coll
> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>

sptrakesh

unread,
May 14, 2012, 10:20:29 AM5/14/12
to mongodb-user


On May 14, 12:26 am, Eliot Horowitz <el...@10gen.com> wrote:
> You can do
>
> NamespaceString( "foo.bar" ).coll

Thanks, this is more elegant than the old way.
Reply all
Reply to author
Forward
0 new messages