public static QualifiedName procedureName( String... namespaceAndName ) { return functionSignature( namespaceAndName ).build().name(); } }
private FromEpoch() { this.signature = new UserFunctionSignature( new QualifiedName( new String[] {"datetime"}, "fromepoch" ), SIGNATURE, Neo4jTypes.NTDateTime, null, new String[0], DESCRIPTION, true ); }
public JmxQueryProcedure( QualifiedName name, MBeanServer jmxServer ) { super( procedureSignature( name ) .in( "query", Neo4jTypes.NTString ) .out( "name", Neo4jTypes.NTString ) .out( "description", Neo4jTypes.NTString ) .out( "attributes", Neo4jTypes.NTMap ) .mode( Mode.DBMS ) .description( "Query JMX management data by domain and name. For instance, \"org.neo4j:*\"" ) .build() ); this.jmxServer = jmxServer; }
public ListComponentsProcedure( QualifiedName name, String neo4jVersion, String neo4jEdition ) { super( procedureSignature( name ) .out( "name", NTString ) // Since Bolt, Cypher and other components support multiple versions // at the same time, list of versions rather than single version. .out( "versions", NTList( NTString ) ) .out( "edition", NTString ) .mode( Mode.DBMS ) .description( "List DBMS components and their versions." ) .build() ); this.neo4jVersion = neo4jVersion; this.neo4jEdition = neo4jEdition; }
@Test public void toStringShouldMatchCypherSyntax() { // When String toStr = procedureSignature( "org", "myProcedure" ) .in( "inputArg", Neo4jTypes.NTList( Neo4jTypes.NTString ) ) .out( "outputArg", Neo4jTypes.NTNumber ) .build() .toString(); // Then assertEquals( "org.myProcedure(inputArg :: LIST? OF STRING?) :: (outputArg :: NUMBER?)", toStr ); }
SubFunction( TemporalFunction<T> base, String name, List<FieldSignature> input, String description ) { this.function = base; this.signature = new UserFunctionSignature( new QualifiedName( new String[] {base.signature.name().name()}, name ), input, base.signature.outputType(), null, ALLOWED, description, true ); }
public static QualifiedName procedureName( String... namespaceAndName ) { return procedureSignature( namespaceAndName ).build().name(); } }
private FunctionResult( UserFunctionSignature signature ) { this.name = signature.name().toString(); this.signature = signature.toString(); this.description = signature.description().orElse( "" ); } }
public static DefaultParameterValue ntList( List<?> value, Neo4jTypes.AnyType inner ) { return new DefaultParameterValue( value, Neo4jTypes.NTList( inner ) ); }
public ProcedureSignature build() { return new ProcedureSignature( name, inputSignature, outputSignature, mode, admin, deprecated, allowed, description, warning, eager, false ); } }
private static Neo4jTypes.AnyType nextInner( Neo4jTypes.AnyType type ) { if ( type instanceof Neo4jTypes.ListType ) { return ((Neo4jTypes.ListType) type).innerType(); } else { return type; } }
ReflectiveUserFunction( UserFunctionSignature signature, MethodHandle constructor, Method udfMethod, TypeMappers.TypeChecker typeChecker, ValueMapper<Object> mapper, List<FieldInjections.FieldSetter> fieldSetters ) { super( mapper, fieldSetters ); this.constructor = constructor; this.udfMethod = udfMethod; this.signature = signature; this.typeChecker = typeChecker; indexesToMap = computeIndexesToMap( signature.inputSignature() ); }
ReflectiveProcedure( ProcedureSignature signature, MethodHandle constructor, Method procedureMethod, OutputMapper outputMapper, List<FieldInjections.FieldSetter> fieldSetters ) { super( null, fieldSetters ); this.constructor = constructor; this.procedureMethod = procedureMethod; this.signature = signature; this.outputMapper = outputMapper; this.indexesToMap = computeIndexesToMap( signature.inputSignature() ); }
@Override public Object map( Object input ) { return mapper.map( input ); }
@Override public int hashCode() { return name.hashCode(); }
private FromEpochMillis() { this.signature = new UserFunctionSignature( new QualifiedName( new String[] {"datetime"}, "fromepochmillis" ), SIGNATURE, Neo4jTypes.NTDateTime, null, new String[0], DESCRIPTION, true ); }
@Override public Object map( Object input ) { return mapper.map( input ); }
@Override public int hashCode() { return name.hashCode(); }