Join the Stack Overflow Community
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

I am trying to pass parameters for a cypher query. I have stepped through the sequence to xhr.send() and am passing it this data:

{"query":"match (U:User {UserID: {UID}})-[:HAS_ROLES]->(R: Roles) return R.Roles as Roles, {IDX} as indx","params":"{UID : \"0012\" ,IDX : 0} "}

Wireshark shows the data being sent to Neo4j as this:

Object Member Key: "query" String value: Member Key: "params" Object

Every POST I send has an empty params object, so clearly the way I am passing this data is not correct. How do I populate the params object?

I am using the ANNE stack.

Michael D. Spence Mockingbird Data Systems, Inc.

            function runAdhocQueryParams(query,myparams) {
                var call = $http({
                    method: 'POST',
                    data: { query: query, params: myparams },
                    url: '/api/runAdhocQuery',
                    headers: { 'Content-Type': 'application/json' }
                });

                return $q.when(call);
            }

    query is
    match (U:User {UserID: {UID}})-[:HAS_ROLES]->(R: Roles) return R.Roles as Roles, {IDX} as indx

    myparams is (in JSON)

    {
      "UID": "0012",
      "IDX": 0
    }
share|improve this question
    
We have no idea how you are currently doing it...show your code – charlietfl yesterday
    
var call = $http({ method: 'POST', data: { query: query, params: jsonifyObjectForNeo4J(myparams) }, // data: { params: myparams, query: query }, // data: { query: query }, // params: params, // data: qAndP, url: '/api/runAdhocQuery', headers: { 'Content-Type': 'application/json' } }); return $q.when(call); – user2974846 yesterday
    
please edit question with properly formatted code and not put code blobs in comments – charlietfl yesterday
    
there is a help button on the editor toolbar...and a code block button also – charlietfl yesterday
    
I am trying to add a comment. I see no help button. – user2974846 yesterday

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.