{"issue":{"state":"open","created_at":"2011-12-01T00:06:37Z","updated_at":"2011-12-01T07:56:06Z","comments":4,"user":{"gravatar_id":"73ba2d202efab9804e1e344f2079f605","id":195035,"url":"https://api.github.com/users/dnagir","avatar_url":"https://secure.gravatar.com/avatar/73ba2d202efab9804e1e344f2079f605?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"dnagir"},"body":"[Batch operations](http://docs.neo4j.org/chunked/milestone/rest-api-batch-ops.html) are absolutely crucial with REST, where transactions are only available within a single request.\r\n\r\nWould be great to have an API for that.\r\n\r\n\r\nI can approximately see how to use it.\r\n\r\nInstead of:\r\n\r\n```ruby\r\nnodes = (1..1000).map { |n| Neography::Node.create(\"age\" => n % 30 + 20, \"name\" => \"Max #{n}\") }\r\n# all nodes are avilable, it executes 1000 requests\r\n```\r\n\r\nWe would write something among:\r\n\r\n\r\n```ruby\r\nnodes = Neography::Batch.start do\r\n  (1..1000).map { |n| Neography::Node.create(\"age\" => n % 30 + 20, \"name\" => \"Max #{n}\") }\r\nend\r\n# all nodes are created and available here. Only 1 batch operation request is executed.\r\n```\r\n\r\nSo when we are within a batch operation, all the requests would be accumulated instead of actually sent.\r\nThen dispatch at the end.\r\n","assignee":null,"id":2409291,"labels":[],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"number":16,"title":"Support batch operations","html_url":"https://github.com/maxdemarzi/neography/issues/16","closed_at":null,"url":"https://api.github.com/repos/maxdemarzi/neography/issues/16","milestone":null},"action":"created","comment":{"created_at":"2011-12-01T07:56:06Z","updated_at":"2011-12-01T07:56:06Z","user":{"gravatar_id":"73ba2d202efab9804e1e344f2079f605","id":195035,"url":"https://api.github.com/users/dnagir","avatar_url":"https://secure.gravatar.com/avatar/73ba2d202efab9804e1e344f2079f605?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"dnagir"},"body":"FYI,\r\n\r\nIt seems there's nothing wrong to always use batching http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-REST-API-always-batch-tp3550568p3550568.html","id":2972085,"url":"https://api.github.com/repos/maxdemarzi/neography/issues/comments/2972085"}}