I have some questions about calling a custom postgresql function:

1) I tried using DSL.field to call this postgresql sql function that return 
VOID, as follows:

private static Field<Void> foo(String param) {
   return DSL.field("ext.foo({0}, {1}, {2})", Void.class, DSL.val(param));
}


But I get this exception from creating the field:
org.jooq.exception.SQLDialectNotSupportedException: Type class java.lang.
Void is not supported in dialect DEFAULT
 at org.jooq.impl.DefaultDataType.getDataType(DefaultDataType.java:803)
 at org.jooq.impl.DefaultDataType.getDataType(DefaultDataType.java:747)
 at org.jooq.impl.DSL.getDataType(DSL.java:16970)
 at org.jooq.impl.DSL.field(DSL.java:7626)

What am I doing wrong?

2) Would DSL.function be more appropriate to use instead of DSL.field in 
question # 1? I wasn't sure how to pass in my argument using DSL.function.

3) In question #1, is there a way to bind the schema name instead of 
hardcoding it in the sql? Or is putting it in the sql the best/only way?

Thank you!

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to