[SERVER-4697] wildcard search on cxx driver Created: 17/Jan/12  Updated: 26/Jan/12  Resolved: 26/Jan/12

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Khosi Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

64 bit
Ubuntu 11.10
Eclipse IDE


Participants:

 Description   

I am sorry to have posted this here, but I tried on the c driver project and there we no responses.

How do I do this (select person from people where name like 'john%'), on the cxx driver?

Currently this is how I achieve my exact matches:-

auto_ptr<mongo::DBClientCursor> cursor =
(*conn).query(NS_INVENTORY, BSON("Name" << name))

Thank you!



 Comments   
Comment by Eliot Horowitz (Inactive) [ 26/Jan/12 ]

You need to use a regex http://api.mongodb.org/cplusplus/current/classmongo_1_1_b_s_o_n_obj_builder.html#afbad311c8ef7ce0ae7cbb34f0ed6d562

Generated at Thu Feb 08 03:06:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.