Database access from extension functions?

Dear All

I have learned, that it is not possible to use selfdefined extension functions with XQuery. Now I am thinking about a workaround.

My question is now, what restrictions such server extension functions have. Do they have access to the Database (XQuery4 or X-Query) and can they make function calls to other functions? (What APIs can they use)

Like this I could simply make one function call by X-Query on the database, and implement the whole query-process in the function.

Best regards

Mic