public abstract class FunctionDefinitionBuilder extends Object
public class LowerFunctionDefinitionBuilder extends FunctionDefinitionBuilder {
public LowerFunctionDefinitionBuilder(String virtualColumn, String type, List<String> columns, @Nullable String argsList) {
super(virtualColumn, type, columns, argsList);
}
public String getFunctionDefinition(DatabaseType databaseType) {
String column = columns.get(0);
return "lower(" + column +")";
}
}
| Modifier and Type | Field and Description |
|---|---|
protected String |
argsList |
protected List<String> |
columns |
| Constructor and Description |
|---|
FunctionDefinitionBuilder(String virtualColumn,
String type,
List<String> columns,
String argsList) |
| Modifier and Type | Method and Description |
|---|---|
abstract String |
getFunctionDefinition(DatabaseType databaseType) |
String |
getType() |
String |
getVirtualColumn(DatabaseType dbType) |
boolean |
supportsFunctionBasedIndices(DatabaseType dbType) |
public FunctionDefinitionBuilder(String virtualColumn, String type, List<String> columns, @Nullable String argsList)
virtualColumn - the name of any virtual column to be created, must be provided, but only used in MySql and SQLServertype - the model type of the virtual column, this should be the same as the function return type and is something like "long-varchar".columns - a list of columns that the function operates on, must contain at least one column.argsList - an optional comma separated string of arguments to be provided to the function.@Nullable public String getVirtualColumn(DatabaseType dbType)
public String getType()
public abstract String getFunctionDefinition(DatabaseType databaseType)
public boolean supportsFunctionBasedIndices(DatabaseType dbType)
Copyright © 2018 Atlassian. All rights reserved.