@Target(value=METHOD) @Retention(value=RUNTIME) public @interface SourceFunction
SelectQuery
. 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;
}
}
For an example see UserDefinedFunctions
.
For more information checkout Source
Supported Functions in Teiid.Modifier and Type | Required Element and Description |
---|---|
String |
source
Defines the datasource name where the function needs to be defined.
|
Modifier and Type | Optional Element and Description |
---|---|
String |
nativequery
Adds teiid_rel:native-query to the function; when omitted the function name
executed as is
|
public abstract String source
public abstract String nativequery
Copyright © 2020. All rights reserved.