Package org.teiid.spring.annotations
Annotation Type SourceFunction
-
@Target(METHOD) @Retention(RUNTIME) public @interface SourceFunction
Using this annotation define Data Source specific Function.
Using this annotation, you can define a static method on a class that is annotated with @UserDefinedFunctions, at runtime this method will be available for execution in Teiid queries such asSelectQuery
. During runtime the function will be evaluated in the source database as it gets pushed down to source for execution
@UserDefinedFunctions public class UserFunctions { @SourceFunction(source="mydb", nativequery="repeat") public static String repeat(String p1, int p2) { return null; } }
UserDefinedFunctions
. For more information checkout Source Supported Functions in Teiid.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
nativequery
Adds teiid_rel:native-query to the function; when omitted the function name executed as is
-
-
-
Element Detail
-
source
String source
Defines the datasource name where the function needs to be defined.- Returns:
- source database name
-
-
-
nativequery
String nativequery
Adds teiid_rel:native-query to the function; when omitted the function name executed as is- Returns:
- native query or command
- Default:
- ""
-
-