diff options
author | Aaron <aaron@10gen.com> | 2010-03-08 16:53:45 -0800 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2010-03-08 16:53:45 -0800 |
commit | 6d095cf3574b7791155b22c5c9f4f13c464df9c8 (patch) | |
tree | c6476d9475cdb3fc45d27098717d00ac7beccd30 /db/matcher.h | |
parent | 53235fdc3667ebd7785788749ca3ec564d6486c6 (diff) | |
download | mongo-6d095cf3574b7791155b22c5c9f4f13c464df9c8.tar.gz |
SERVER-322 implement $in with regex
Diffstat (limited to 'db/matcher.h')
-rw-r--r-- | db/matcher.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/db/matcher.h b/db/matcher.h index 5f657de6230..3839b68aab5 100644 --- a/db/matcher.h +++ b/db/matcher.h @@ -34,12 +34,9 @@ namespace mongo { const char *regex; const char *flags; string prefix; - pcrecpp::RE *re; + shared_ptr< pcrecpp::RE > re; bool isNot; - RegexMatcher() : re( 0 ), isNot() {} - ~RegexMatcher() { - delete re; - } + RegexMatcher() : isNot() {} }; struct element_lt @@ -70,6 +67,7 @@ namespace mongo { int compareOp; bool isNot; shared_ptr< set<BSONElement,element_lt> > myset; + shared_ptr< vector<RegexMatcher> > myregex; // these are for specific operators int mod; |