|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.datatools.sqltools.sqlbuilder.model.FunctionHelper
public class FunctionHelper
This class provides helpful services for dealing with SQL functions. The fields and methods in this class are generic for databases. Subclasses provide database-specific services.
Field Summary | |
---|---|
static int |
ALL_LOCATION_BOTTOM
"All functions" label should appear at bottom of category list. |
static int |
ALL_LOCATION_OMITTED
"All functions" label should be omitted from category list. |
static int |
ALL_LOCATION_SORTED
"All functions" label should appear sorted with other category labels in the category list. |
static int |
ALL_LOCATION_TOP
"All functions" label should appear at top of category list. |
static java.lang.String |
CAT_LABEL_AGGREGATE_FUNCTIONS
Aggregate (AKA column, grouping, summary) functions category label. |
static java.lang.String |
CAT_LABEL_ALL_FUNCTIONS
All functions category label. |
static java.lang.String |
CAT_LABEL_CONVERSION_FUNCTIONS
Conversion functions category label. |
static java.lang.String |
CAT_LABEL_DATETIME_FUNCTIONS
Date, time, timestamp functions category label. |
static java.lang.String |
CAT_LABEL_NUMERIC_FUNCTIONS
Math functions category label. |
static java.lang.String |
CAT_LABEL_SCALAR_FUNCTIONS
Scalar functions category label. |
static java.lang.String |
CAT_LABEL_SPECIAL_REGISTERS
Special Registers category label. |
static java.lang.String |
CAT_LABEL_STRING_FUNCTIONS
Text functions category label. |
static java.lang.String |
CAT_LABEL_USER_DEFINED_FUNCTIONS
User-Defined Functions (UDF) category label. |
Constructor Summary | |
---|---|
FunctionHelper(Database db)
Constructs an instance of this class with an association to the given database. |
Method Summary | |
---|---|
java.util.List |
getAggregateFunctionNames()
Gets a list of names of the aggregate (AKA column, grouping, summary) functions supported by the database. |
java.util.List |
getAllBuiltinFunctionNames()
Gets a list of names of all the built-in functions supported by the database. |
java.util.List |
getConversionFunctionNames()
Gets a list of names of the conversion (cast) functions supported by the database. |
Database |
getDatabase()
Gets the Database object with which this helper is associated. |
java.util.List |
getDatetimeFunctionNames()
Gets a list of the names of datetime (date, time, timestamp) functions supported by the database. |
java.util.List |
getFunctionCategories(int allCatLocation)
Gets a list of all function categories supported by the database. |
java.util.List |
getFunctionNames(java.lang.String category)
Gets a list of function names supported by the associated database in the given function category. |
java.lang.String[][] |
getFunctionSignatures(java.lang.String functionName)
Gets an array of arrays (ie, a table) containing the function signatures specified by the given named function. |
static FunctionHelper |
getInstance(Database db)
Gets an instance of FunctionHelper that is the best match for the
database represented by the given Database object. |
boolean |
getIsFunctionAllowingStar(java.lang.String funcName)
Gets whether or not the given function allows "*" as a parameter (ie, COUNT(*) ). |
java.util.List |
getNumericFunctionNames()
Gets a list of the names of numeric (math) functions supported by the database. |
java.util.List |
getScalarFunctionNames()
Gets a list of names of scalar functions supported by the database. |
java.util.List |
getSpecialRegisterNames()
Gets a list of special registers supported by the database. |
java.util.List |
getStringFunctionNames()
Gets a list of string (text) functions supported by the database. |
java.util.List |
getUserDefinedFunctionNames()
Gets a list of user-defined functions supported by the database. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CAT_LABEL_ALL_FUNCTIONS
public static final java.lang.String CAT_LABEL_AGGREGATE_FUNCTIONS
public static final java.lang.String CAT_LABEL_CONVERSION_FUNCTIONS
public static final java.lang.String CAT_LABEL_DATETIME_FUNCTIONS
public static final java.lang.String CAT_LABEL_NUMERIC_FUNCTIONS
public static final java.lang.String CAT_LABEL_SCALAR_FUNCTIONS
public static final java.lang.String CAT_LABEL_SPECIAL_REGISTERS
public static final java.lang.String CAT_LABEL_STRING_FUNCTIONS
public static final java.lang.String CAT_LABEL_USER_DEFINED_FUNCTIONS
public static final int ALL_LOCATION_OMITTED
public static final int ALL_LOCATION_TOP
public static final int ALL_LOCATION_BOTTOM
public static final int ALL_LOCATION_SORTED
Constructor Detail |
---|
public FunctionHelper(Database db)
db
- the Database
for which function help is neededMethod Detail |
---|
public static FunctionHelper getInstance(Database db)
FunctionHelper
that is the best match for the
database represented by the given Database
object.
public Database getDatabase()
Database
object with which this helper is associated.
public java.util.List getFunctionCategories(int allCatLocation)
allCatLocation
- indicates if, and where, the "All categories" category
label should appear in the category list
public java.util.List getFunctionNames(java.lang.String category)
category
- the function category for which functions are needed
public java.util.List getAllBuiltinFunctionNames()
public java.util.List getAggregateFunctionNames()
public java.util.List getConversionFunctionNames()
public java.util.List getDatetimeFunctionNames()
public java.util.List getNumericFunctionNames()
public java.util.List getScalarFunctionNames()
public java.util.List getSpecialRegisterNames()
public java.util.List getStringFunctionNames()
public java.util.List getUserDefinedFunctionNames()
public java.lang.String[][] getFunctionSignatures(java.lang.String functionName)
functionName
- the name of the function for which the parameter formats are wanted
public boolean getIsFunctionAllowingStar(java.lang.String funcName)
funcName
- the name of the function to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |