Advertisement
Guest User

Untitled

a guest
Jun 27th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. $http.post('http://localhost:8529/_api/cursor', {
  2. query: `
  3. FOR doc IN collection
  4. FILTER doc.color = @color
  5. RETURN doc
  6. `,
  7. bindVars: {color: 'blue'}
  8. })
  9. .then(successCallback);
  10.  
  11. var aql = arangojs.aql;
  12. var color = 'blue';
  13. $http.post('http://localhost:8529/_api/cursor', aql`
  14. FOR doc IN collection
  15. FILTER doc.color = ${color}
  16. RETURN doc
  17. `)
  18. .then(successCallback);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement