org.neo4j.kernel.impl.proc.Procedures.getAllFunctions()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(101)

本文整理了Java中org.neo4j.kernel.impl.proc.Procedures.getAllFunctions()方法的一些代码示例,展示了Procedures.getAllFunctions()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Procedures.getAllFunctions()方法的具体详情如下:
包路径:org.neo4j.kernel.impl.proc.Procedures
类名称:Procedures
方法名:getAllFunctions

Procedures.getAllFunctions介绍

暂无

代码示例

代码示例来源:origin: neo4j/neo4j

@Description( "List all user functions in the DBMS." )
@Procedure( name = "dbms.functions", mode = DBMS )
public Stream<FunctionResult> listFunctions()
{
  securityContext.assertCredentialsNotExpired();
  return graph.getDependencyResolver().resolveDependency( Procedures.class ).getAllFunctions().stream()
      .sorted( Comparator.comparing( a -> a.name().toString() ) )
      .map( FunctionResult::new );
}

代码示例来源:origin: neo4j/neo4j

@Test
public void shouldGetAllRegisteredFunctions() throws Throwable
{
  // When
  procs.register( function( functionSignature( "org", "myproc1" ).out(Neo4jTypes.NTAny).build() ) );
  procs.register( function( functionSignature( "org", "myproc2" ).out(Neo4jTypes.NTAny).build() ) );
  procs.register( function( functionSignature( "org", "myproc3" ).out(Neo4jTypes.NTAny).build() ) );
  // Then
  List<UserFunctionSignature> signatures = Iterables.asList( procs.getAllFunctions() );
  assertThat( signatures, containsInAnyOrder(
      functionSignature( "org", "myproc1" ).out(Neo4jTypes.NTAny).build(),
      functionSignature( "org", "myproc2" ).out(Neo4jTypes.NTAny).build(),
      functionSignature( "org", "myproc3" ).out(Neo4jTypes.NTAny).build() ) );
}

代码示例来源:origin: neo4j/neo4j

@Test
public void shouldGetRegisteredAggregationFunctions() throws Throwable
{
  // When
  procs.register( function( functionSignature( "org", "myfunc1" ).out(Neo4jTypes.NTAny).build() ) );
  procs.register( function( functionSignature( "org", "myfunc2" ).out(Neo4jTypes.NTAny).build() ) );
  procs.register( aggregationFunction( functionSignature( "org", "myaggrfunc1" ).out(Neo4jTypes.NTAny).build() ) );
  // Then
  List<UserFunctionSignature> signatures = Iterables.asList( procs.getAllFunctions() );
  assertThat( signatures, containsInAnyOrder(
      functionSignature( "org", "myfunc1" ).out(Neo4jTypes.NTAny).build(),
      functionSignature( "org", "myfunc2" ).out(Neo4jTypes.NTAny).build(),
      functionSignature( "org", "myaggrfunc1" ).out(Neo4jTypes.NTAny).build() ) );
}

代码示例来源:origin: org.neo4j/neo4j-enterprise-kernel

@Description( "List all user functions in the DBMS." )
@Procedure( name = "dbms.functions", mode = DBMS )
public Stream<FunctionResult> listFunctions()
{
  securityContext.assertCredentialsNotExpired();
  return graph.getDependencyResolver().resolveDependency( Procedures.class ).getAllFunctions().stream()
      .sorted( Comparator.comparing( a -> a.name().toString() ) )
      .map( FunctionResult::new );
}

代码示例来源:origin: org.neo4j/neo4j-kernel

@Description( "List all user functions in the DBMS." )
@Procedure( name = "dbms.functions", mode = DBMS )
public Stream<FunctionResult> listFunctions()
{
  securityContext.assertCredentialsNotExpired();
  return graph.getDependencyResolver().resolveDependency( Procedures.class ).getAllFunctions().stream()
      .sorted( Comparator.comparing( a -> a.name().toString() ) )
      .map( FunctionResult::new );
}

相关文章