DEV Community

mohayu22
mohayu22

Posted on

Use postgreSQL native functions inside cypher query (AGE)

Although there are numerous helpful functions available in PostgreSQL that you might want to utilize in your project, they cannot be directly used in a Cypher query.

To incorporate PostgreSQL's functions within a Cypher query, one approach is to create wrapper functions in AGE. These wrapper functions should be prefixed with age_ when writing C code. However, when using these functions in a Cypher query, there's no need to include the prefix.

To invoke the desired PostgreSQL function within the wrapper function, you can employ the DirectFunctionCallX macro. Remember to include the file where the function is located to ensure proper compilation and execution.

Top comments (0)