com.im.df.api 5.9

com.im.df.api.capabilities
Interface DFFieldFunctionCapability.Function

Enclosing interface:
DFFieldFunctionCapability

public static interface DFFieldFunctionCapability.Function


Method Summary
 String buidQuerySQL(DFTermExpression expr)
          Build the SQL fragment that defines the part of the WHERE clause.
 String getSelectSQL()
          Get the SQL that retrieves the values.
 boolean isQueryable()
          Not all functions will be queryable, or sensible to run queries against.
 

Method Detail

getSelectSQL

String getSelectSQL()
Get the SQL that retrieves the values. This will be addded to the SELECT clause. In the case of a simple function that only uses columns from the main table this can just be the simple function e.g. "col1 + col2", but if the function is more complex (e.g. using columns from other tables) then it can be a sub-select e.g. "(SELECT avg(wombat_act_list.value_min)" (you must provide the outer brackets).

Returns:
The SQL fragment

isQueryable

boolean isQueryable()
Not all functions will be queryable, or sensible to run queries against. These should return false.

Returns:
Whether the function is queryable.

buidQuerySQL

String buidQuerySQL(DFTermExpression expr)
Build the SQL fragment that defines the part of the WHERE clause. e.g. select ... from ... where ... and col1 + col2 < 100. If the function is not queryable this method can return null.

Parameters:
expr - The query expression e.g. field < 100
Returns:
The SQL fragment

com.im.df.api 5.9