Help { @Procedure("apoc.help") @Description("Provides descriptions of available procedures. To narrow the results, supply a search string. To also search in the description text, append + to the end of the search string.") public Stream<HelpResult> info(@Name("proc") String name) throws Exception { boolean searchText = false; if (name != null) { name = name.trim(); if (name.endsWith("+")) { name = name.substring(0, name.lastIndexOf('+')).trim(); searchText = true; } } String filter = " WHERE name starts with 'apoc.' " + " AND ($name IS NULL OR toLower(name) CONTAINS toLower($name) " + " OR ($desc IS NOT NULL AND toLower(description) CONTAINS toLower($desc))) " + "RETURN type, name, description, signature "; String query = "WITH 'procedure' as type CALL dbms.procedures() yield name, description, signature " + filter + " UNION ALL " + "WITH 'function' as type CALL dbms.functions() yield name, description, signature " + filter; return tx.execute(query, map("name", name, "desc", searchText ? name : null)) .stream().map(row -> new HelpResult(row, !extended.contains((String) row.get("name")))); } Help(); @Procedure("apoc.help") @Description("Provides descriptions of available procedures. To narrow the results, supply a search string. To also search in the description text, append + to the end of the search string.") Stream<HelpResult> info(@Name("proc") String name); @Context
    public Transaction tx; }
@Test public void info() throws Exception { TestUtil.testCall(db,"CALL apoc.help($text)",map("text","bitwise"), (row) -> { assertEquals("function",row.get("type")); assertEquals("apoc.bitwise.op",row.get("name")); assertEquals(true, ((String) row.get("text")).contains("bitwise operations")); }); TestUtil.testCall(db,"CALL apoc.help($text)",map("text","operations+"), (row) -> assertEquals("apoc.bitwise.op",row.get("name"))); TestUtil.testCall(db,"CALL apoc.help($text)",map("text","toSet"), (row) -> { assertEquals("function",row.get("type")); assertEquals("apoc.coll.toSet",row.get("name")); assertEquals(true, ((String) row.get("text")).contains("unique list")); }); }