sorry, missed your email
the regexp must be _the_ param

 var query_PATHS = "match n where n.name =~ {*myParam*} return n"
  var params = {myParam: "'.*"+text+".*'}
...

On Fri, Sep 19, 2014 at 7:20 PM, David Bigelow <
[email protected]> wrote:

> Still need to figure out how this is supposed to work with parameters....
>  any thoughts?
>
>
> On Saturday, September 6, 2014 9:22:57 AM UTC-4, David Bigelow wrote:
>>
>> Michael - Thanks for your input on this.  You got me past one hump and
>> into the next.
>>
>> Next problem -- "HOW" to pass the values for the parameter?!
>>
>> My goal is to pass in values to the function then pass them in as
>> parameter values to the parameter in the cypher... (my understanding is
>> that the query optimizer will somehow "cache" the query for better reuse it
>> if sees it again in the future?!
>>
>>
>>     paramTest : function (val) {
>>
>>
>>         console.log('test.paramTest:');
>>
>>
>>         var query_PATHS = "match n where n.name =~'.*{*myParam*}.*'
>> return n"
>>
>>
>>
>>         var cypherRequest = {
>>             statements : [{
>>                     query: query_PATHS,
>>                     parameters: "*myParam*" || val,
>>                     resultDataContents: ["row", "graph"]
>>                 }]
>>         }
>>
>>
>>         /// convert from an object to a string
>>         cypherRequest = JSON.stringify(cypherRequest);
>> ......
>>
>>
>> I did not notice any advice in the documentation on how to do this --
>>  parameters: "*myParam*" || val,?!?!  If that is even right?
>>
>> So how do I take in a value and pass it into the request structure so
>> that the parameter gets the value?  And what if you are passing in an Array?
>>
>> Dave
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to