{"action":"created","issue":{"url":"https://api.github.com/repos/neo4j/neo4j/issues/6235","labels_url":"https://api.github.com/repos/neo4j/neo4j/issues/6235/labels{/name}","comments_url":"https://api.github.com/repos/neo4j/neo4j/issues/6235/comments","events_url":"https://api.github.com/repos/neo4j/neo4j/issues/6235/events","html_url":"https://github.com/neo4j/neo4j/pull/6235","id":127174186,"number":6235,"title":"Loading read-only procedures","user":{"login":"pontusmelke","id":88000,"avatar_url":"https://avatars.githubusercontent.com/u/88000?v=3","gravatar_id":"","url":"https://api.github.com/users/pontusmelke","html_url":"https://github.com/pontusmelke","followers_url":"https://api.github.com/users/pontusmelke/followers","following_url":"https://api.github.com/users/pontusmelke/following{/other_user}","gists_url":"https://api.github.com/users/pontusmelke/gists{/gist_id}","starred_url":"https://api.github.com/users/pontusmelke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pontusmelke/subscriptions","organizations_url":"https://api.github.com/users/pontusmelke/orgs","repos_url":"https://api.github.com/users/pontusmelke/repos","events_url":"https://api.github.com/users/pontusmelke/events{/privacy}","received_events_url":"https://api.github.com/users/pontusmelke/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neo4j/neo4j/labels/3.0","name":"3.0","color":"006b75"},{"url":"https://api.github.com/repos/neo4j/neo4j/labels/kernel","name":"kernel","color":"0052cc"},{"url":"https://api.github.com/repos/neo4j/neo4j/labels/remoting","name":"remoting","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-18T08:09:40Z","updated_at":"2016-01-18T08:14:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/neo4j/neo4j/pulls/6235","html_url":"https://github.com/neo4j/neo4j/pull/6235","diff_url":"https://github.com/neo4j/neo4j/pull/6235.diff","patch_url":"https://github.com/neo4j/neo4j/pull/6235.patch"},"body":"Given that a user have put a jar file containing the following compiled class in the `plugins` directory in Neo4j:\r\n\r\n    package testprocs;\r\n\r\n    import java.util.stream.Stream;\r\n\r\n    public class SimpleReadProcedures\r\n    {\r\n\r\n        public static class MyOutputRecord\r\n        {\r\n            public String name;\r\n        }\r\n\r\n        @Procedure\r\n        public Stream<MyOutputRecord> listCoolPeople() {\r\n            return Stream.of(\r\n                    new MyOutputRecord( \"Bonnie\" ),\r\n                    new MyOutputRecord( \"Clyde\" ));\r\n        }\r\n    }\r\n\r\n\r\nwe can now load and call this procedure from cypher with\r\n```\r\n    CALL testprocs.listCoolPeople()\r\n```\r\n\r\nIn this PR we also add support for handling input arguments in procedures. Which are annotated with `@FieldName`:\r\n\r\n```\r\n@ReadOnlyProcedure\r\npublic Stream<NodeOutput> node( @FieldName( \"id\" ) long id )\r\n{\r\n    NodeOutput nodeOutput = new NodeOutput();\r\n    nodeOutput.setNode( nodeFromId( id ) );\r\n    return Stream.of( nodeOutput );\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/neo4j/neo4j/issues/comments/172458604","html_url":"https://github.com/neo4j/neo4j/pull/6235#issuecomment-172458604","issue_url":"https://api.github.com/repos/neo4j/neo4j/issues/6235","id":172458604,"user":{"login":"jexp","id":67427,"avatar_url":"https://avatars.githubusercontent.com/u/67427?v=3","gravatar_id":"","url":"https://api.github.com/users/jexp","html_url":"https://github.com/jexp","followers_url":"https://api.github.com/users/jexp/followers","following_url":"https://api.github.com/users/jexp/following{/other_user}","gists_url":"https://api.github.com/users/jexp/gists{/gist_id}","starred_url":"https://api.github.com/users/jexp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jexp/subscriptions","organizations_url":"https://api.github.com/users/jexp/orgs","repos_url":"https://api.github.com/users/jexp/repos","events_url":"https://api.github.com/users/jexp/events{/privacy}","received_events_url":"https://api.github.com/users/jexp/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T08:14:17Z","updated_at":"2016-01-18T08:14:17Z","body":"woot!"}}