OFunctionLibrary

Interface used to store the available OFunction instances on a database.

Function Library

OrientDB SQL supports the use of functions and user-defined functions, which are typically defined in JavaScript using a CREATE FUNCTION statement. Internally, OrientDB stores functions as a series of OFunction instances. When working in a Java, you can define series of new functions internally from your application code.

You can retrieve the function library from ODatabaseSession or ODatabaseDocument by first retrieving the metadata with the getMetadata() method and then retrieving the function library from the metadata with the getFunctionLibrary() method. In order to operate on the function library, you also need to import it into your code.

import com.orientechnologies.orient.core.metadata.function.OFunctionLibrary;

Methods

MethodReturn TypeDescription
createFunction()OFunctionCreates a new function
dropFunction()voidRemoves function
getFunction()OFunctionRetrieves the given function
getFunctionNames()Set<String>Retrieves the logical names for functions in the library