Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

wrappin

  • Loading branch information...
commit 31cb5dad7a64f9fc24c9ae872fc897d39fd7e3c6 1 parent ad8455c
billy authored
Showing with 6 additions and 1 deletion.
  1. +1 −1  part2/MongoDB.cfc
  2. +5 −0 part2/SearchMongoTest.cfc
View
2  part2/MongoDB.cfc
@@ -174,7 +174,7 @@ function endsWith(element, val){
function exists(element, val){
var regex = '.*' & val & '.*';
- expression_builder.exists( element, pattern.compile(regex) );
+ expression_builder.exists( element, regex );
return this;
}
View
5 part2/SearchMongoTest.cfc
@@ -1,6 +1,11 @@
<cfcomponent output="false" extends="mxunit.framework.TestCase">
<cfscript>
+ function searchTitleContains() {
+ results = mongo.collection('blog').exists('TITLE','Blog Title No.60').search('TITLE,AUTHOR,PUB_DATE');
+ debug( results.toArray().toString() );
+ assertEquals( 11,results.toArray().size() );
+ }
function searchTitleStartsWith() {
results = mongo.collection('blog').startsWith('TITLE','Blog Title No.60').search('TITLE,AUTHOR,PUB_DATE');
Please sign in to comment.
Something went wrong with that request. Please try again.