|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DB2Function
A representation of the model object 'DB2 Function'. SQL Reference for Cross-Platform Development - v1.1 http://www7b.software.ibm.com/dmdd/library/techarticle/0206sqlref/0206sqlref.html Functions (Chapter 1. Concepts 9) A function is a routine that can be invoked from within other SQL statements and returns a value, or a table. For more information, see "Functions" on page 93. Functions (Chapter 2. Language elements 93) A function is an operation denoted by a function name followed by zero or more operands that are enclosed in parentheses. It represents a relationship between a set of input values and a set of result values. The input values to a function are called arguments. For example, a function can be passed two input arguments that have date and time data types and return a value with a timestamp data type as the result. Types of functions: There are several ways to classify functions. One way to classify functions is as built-in, user-defined, or generated user-defined functions for distinct types. - Built-in functions are functions that come with the database manager. These functions provide a single-value result. Built-in functions include operator functions such as ??+??, column functions such as AVG, and scalar functions such as SUBSTR. For a list of the built-in column and scalar functions and information on these functions, see Chapter 3, "Built-in functions", on page 131. The built-in functions are in a product-specific schema. - User-defined functions are functions that are created using the CREATE FUNCTION statement and registered to the database manager in the catalog. For more information, see "CREATE FUNCTION" on page 325. These functions allow users to extend the function of the database manager by adding their own or third party vendor function definitions. A user-defined function is an SQL, external, or sourced function. An SQL function is defined to the database using only an SQL RETURN statement. An external function is defined to the database with a reference to an external program that is executed when the function is invoked. A sourced function is defined to the database with a reference to a built-in function or another user-defined function. Sourced functions can be used to extend built-in column and scalar functions for use on distinct types. A user-defined function resides in the schema in which it was created. - Generated user-defined functions for distinct types are functions that the database manager automatically generates when a distinct type is created using the CREATE DISTINCT TYPE statement. These functions support casting from the distinct type to the source type and from the source type to the distinct type. The ability to cast between the data types is important because a distinct type is compatible only with itself. The generated user-defined functions for distinct types reside in the same schema as the distinct type for which they were created. For more information about the functions that are generated for a distinct type, see "CREATE DISTINCT TYPE" on page 319. Another way to classify functions is as column, scalar, or table functions, depending on the input data values and result values. - A column function receives a set of values for each argument (such as the values of a column) and returns a single-value result for the set of input values. Column functions are sometimes called aggregating functions. Built-in functions and user-defined sourced functions can be column functions. - A scalar function receives a single value for each argument and returns a single-value result. Built-in functions and user-defined functions can be scalar functions. Generated user-defined functions for distinct types are also scalar functions. - A table function returns a table for the set of arguments it receives. Each argument is a single value. A table function can be referenced only in the FROM clause of a subselect. A table function can be defined as an external function, but a table function cannot be a sourced function. Table functions can be used to apply SQL language processing power to data that is not data that is not stored in the database or to allow access to such data as if it were stored in a result table. For example, a table function can take a file and convert it to a table, get data from the Web and tabularize it, or access a Lotus Notes database and return information about email messages.
The following features are supported:
Final Call
Scratch Pad
Scratch Pad Length
Function Type
Predicate
External Action
Cardinality
Allow Parallel
Return Clause
Origin
Inherit Lock Request
DB2ModelPackage.getDB2Function()
Field Summary | |
---|---|
static java.lang.String |
COLUMN_TYPE
Pseudo-enumerated value for type. |
static java.lang.String |
ROW_TYPE
Pseudo-enumerated value for type. |
static java.lang.String |
SCALAR_TYPE
Pseudo-enumerated value for type. |
static java.lang.String |
TABLE_TYPE
Pseudo-enumerated value for type. |
Fields inherited from interface com.ibm.db.models.db2.DB2Routine |
---|
CLEAN, DIRTY, DIRTY_DDL |
Method Summary | |
---|---|
int |
getCardinality()
Returns the value of the 'Cardinality' attribute. |
java.lang.String |
getFunctionType()
Returns the value of the 'Function Type' attribute. |
OriginType |
getOrigin()
Returns the value of the 'Origin' attribute. |
java.lang.String |
getPredicate()
Returns the value of the 'Predicate' attribute. |
java.lang.String |
getReturnClause()
Returns the value of the 'Return Clause' attribute. |
int |
getScratchPadLength()
Returns the value of the 'Scratch Pad Length' attribute. |
boolean |
isAllowParallel()
Returns the value of the 'Allow Parallel' attribute. |
boolean |
isExternalAction()
Returns the value of the 'External Action' attribute. |
boolean |
isFinalCall()
Returns the value of the 'Final Call' attribute. |
boolean |
isInheritLockRequest()
Returns the value of the 'Inherit Lock Request' attribute. |
boolean |
isScratchPad()
Returns the value of the 'Scratch Pad' attribute. |
void |
setAllowParallel(boolean value)
Sets the value of the ' Allow Parallel ' attribute. |
void |
setCardinality(int value)
Sets the value of the ' Cardinality ' attribute. |
void |
setExternalAction(boolean value)
Sets the value of the ' External Action ' attribute. |
void |
setFinalCall(boolean value)
Sets the value of the ' Final Call ' attribute. |
void |
setFunctionType(java.lang.String value)
Sets the value of the ' Function Type ' attribute. |
void |
setInheritLockRequest(boolean value)
Sets the value of the ' Inherit Lock Request ' attribute. |
void |
setOrigin(OriginType value)
Sets the value of the ' Origin ' attribute. |
void |
setPredicate(java.lang.String value)
Sets the value of the ' Predicate ' attribute. |
void |
setReturnClause(java.lang.String value)
Sets the value of the ' Return Clause ' attribute. |
void |
setScratchPad(boolean value)
Sets the value of the ' Scratch Pad ' attribute. |
void |
setScratchPadLength(int value)
Sets the value of the ' Scratch Pad Length ' attribute. |
Methods inherited from interface com.ibm.db.models.db2.DB2Routine |
---|
getChangeState, getDebugId, getExtendedOptions, getFenced, getOrigParmSig, getOrigSchemaName, getParmCcsid, getProgramType, getRoutineExtensions, getSpecialRegister, getThreadsafe, isDbInfo, isFederated, isImplicitSchema, setChangeState, setDbInfo, setDebugId, setFederated, setFenced, setImplicitSchema, setOrigParmSig, setOrigSchemaName, setParmCcsid, setProgramType, setSpecialRegister, setThreadsafe |
Methods inherited from interface org.eclipse.wst.rdb.internal.models.sql.routines.Routine |
---|
getAuthorizationID, getCreationTS, getExternalName, getInputParameters, getLanguage, getLastAlteredTS, getOutputParameters, getParameters, getParameterStyle, getSchema, getSecurity, getSource, getSpecificName, getSqlDataAccess, isDeterministic, setAuthorizationID, setCreationTS, setDeterministic, setExternalName, setLanguage, setLastAlteredTS, setParameterStyle, setSchema, setSecurity, setSource, setSpecificName, setSqlDataAccess |
Methods inherited from interface org.eclipse.wst.rdb.internal.models.sql.schema.SQLObject |
---|
addEAnnotation, addEAnnotationDetail, getComments, getDependencies, getDescription, getEAnnotation, getEAnnotationDetail, getLabel, getPrivileges, removeEAnnotationDetail, setAnnotationDetail, setDescription, setLabel |
Methods inherited from interface org.eclipse.emf.ecore.sdo.EDataObject |
---|
getInstanceProperties |
Methods inherited from interface commonj.sdo.DataObject |
---|
createDataObject, createDataObject, createDataObject, createDataObject, createDataObject, createDataObject, delete, get, get, get, getBigDecimal, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getBytes, getBytes, getBytes, getChar, getChar, getChar, getContainer, getContainmentProperty, getDataGraph, getDataObject, getDataObject, getDataObject, getDate, getDate, getDate, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInt, getList, getList, getList, getLong, getLong, getLong, getSequence, getSequence, getSequence, getShort, getShort, getShort, getString, getString, getString, getType, isSet, isSet, isSet, set, set, set, setBigDecimal, setBigDecimal, setBigDecimal, setBigInteger, setBigInteger, setBigInteger, setBoolean, setBoolean, setBoolean, setByte, setByte, setByte, setBytes, setBytes, setBytes, setChar, setChar, setChar, setDataObject, setDataObject, setDataObject, setDate, setDate, setDate, setDouble, setDouble, setDouble, setFloat, setFloat, setFloat, setInt, setInt, setInt, setList, setList, setList, setLong, setLong, setLong, setShort, setShort, setShort, setString, setString, setString, unset, unset, unset |
Methods inherited from interface org.eclipse.emf.ecore.ENamedElement |
---|
getName, setName |
Methods inherited from interface org.eclipse.emf.ecore.EModelElement |
---|
getEAnnotations |
Methods inherited from interface org.eclipse.wst.rdb.internal.models.sql.schema.SQLObject |
---|
addEAnnotation, addEAnnotationDetail, getComments, getDependencies, getDescription, getEAnnotation, getEAnnotationDetail, getLabel, getPrivileges, removeEAnnotationDetail, setAnnotationDetail, setDescription, setLabel |
Methods inherited from interface org.eclipse.emf.ecore.sdo.EDataObject |
---|
getInstanceProperties |
Methods inherited from interface commonj.sdo.DataObject |
---|
createDataObject, createDataObject, createDataObject, createDataObject, createDataObject, createDataObject, delete, get, get, get, getBigDecimal, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getBytes, getBytes, getBytes, getChar, getChar, getChar, getContainer, getContainmentProperty, getDataGraph, getDataObject, getDataObject, getDataObject, getDate, getDate, getDate, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInt, getList, getList, getList, getLong, getLong, getLong, getSequence, getSequence, getSequence, getShort, getShort, getShort, getString, getString, getString, getType, isSet, isSet, isSet, set, set, set, setBigDecimal, setBigDecimal, setBigDecimal, setBigInteger, setBigInteger, setBigInteger, setBoolean, setBoolean, setBoolean, setByte, setByte, setByte, setBytes, setBytes, setBytes, setChar, setChar, setChar, setDataObject, setDataObject, setDataObject, setDate, setDate, setDate, setDouble, setDouble, setDouble, setFloat, setFloat, setFloat, setInt, setInt, setInt, setList, setList, setList, setLong, setLong, setLong, setShort, setShort, setShort, setString, setString, setString, unset, unset, unset |
Methods inherited from interface org.eclipse.emf.ecore.ENamedElement |
---|
getName, setName |
Methods inherited from interface org.eclipse.emf.ecore.EModelElement |
---|
getEAnnotations |
Field Detail |
---|
static final java.lang.String COLUMN_TYPE
DB2Function#setType(String);
,
Constant Field Valuesstatic final java.lang.String SCALAR_TYPE
DB2Function#setType(String);
,
Constant Field Valuesstatic final java.lang.String TABLE_TYPE
DB2Function#setType(String);
,
Constant Field Valuesstatic final java.lang.String ROW_TYPE
DB2Function#setType(String);
,
Constant Field ValuesMethod Detail |
---|
boolean isFinalCall()
setFinalCall(boolean)
,
DB2ModelPackage.getDB2Function_FinalCall()
void setFinalCall(boolean value)
Final Call
' attribute.
value
- the new value of the 'Final Call' attribute.isFinalCall()
boolean isScratchPad()
If True, then there can be an optional length (see scratchPadLength)
setScratchPad(boolean)
,
DB2ModelPackage.getDB2Function_ScratchPad()
void setScratchPad(boolean value)
Scratch Pad
' attribute.
value
- the new value of the 'Scratch Pad' attribute.isScratchPad()
int getScratchPadLength()
setScratchPadLength(int)
,
DB2ModelPackage.getDB2Function_ScratchPadLength()
void setScratchPadLength(int value)
Scratch Pad Length
' attribute.
value
- the new value of the 'Scratch Pad Length' attribute.getScratchPadLength()
java.lang.String getFunctionType()
Please refer to the defined constants at the beginning of this module for the values to use when passing in the argument.
The valid values to indicate the function type are: C (Column) S (Scaler) T (Table) R (Row)
setFunctionType(String)
,
DB2ModelPackage.getDB2Function_FunctionType()
void setFunctionType(java.lang.String value)
Function Type
' attribute.
Please refer to the defined constants at the beginning of this module for the values to use when passing in the argument.
value
- the new value of the 'Function Type' attribute.getFunctionType()
java.lang.String getPredicate()
setPredicate(String)
,
DB2ModelPackage.getDB2Function_Predicate()
void setPredicate(java.lang.String value)
Predicate
' attribute.
value
- the new value of the 'Predicate' attribute.getPredicate()
boolean isExternalAction()
setExternalAction(boolean)
,
DB2ModelPackage.getDB2Function_ExternalAction()
void setExternalAction(boolean value)
External Action
' attribute.
value
- the new value of the 'External Action' attribute.isExternalAction()
int getCardinality()
setCardinality(int)
,
DB2ModelPackage.getDB2Function_Cardinality()
void setCardinality(int value)
Cardinality
' attribute.
value
- the new value of the 'Cardinality' attribute.getCardinality()
boolean isAllowParallel()
setAllowParallel(boolean)
,
DB2ModelPackage.getDB2Function_AllowParallel()
void setAllowParallel(boolean value)
Allow Parallel
' attribute.
value
- the new value of the 'Allow Parallel' attribute.isAllowParallel()
java.lang.String getReturnClause()
setReturnClause(String)
,
DB2ModelPackage.getDB2Function_ReturnClause()
void setReturnClause(java.lang.String value)
Return Clause
' attribute.
value
- the new value of the 'Return Clause' attribute.getReturnClause()
OriginType getOrigin()
OriginType
.
If the meaning of the 'Origin' attribute isn't clear, there really should be more of a description here...
OriginType
,
setOrigin(OriginType)
,
DB2ModelPackage.getDB2Function_Origin()
void setOrigin(OriginType value)
Origin
' attribute.
value
- the new value of the 'Origin' attribute.OriginType
,
getOrigin()
boolean isInheritLockRequest()
If the meaning of the 'Inherit Lock Request' attribute isn't clear, there really should be more of a description here...
setInheritLockRequest(boolean)
,
DB2ModelPackage.getDB2Function_InheritLockRequest()
void setInheritLockRequest(boolean value)
Inherit Lock Request
' attribute.
value
- the new value of the 'Inherit Lock Request' attribute.isInheritLockRequest()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |