public class DbCreateStructFunction extends AbstractDbFunction
Struct instances.
Function receives three arguments:
_ Name of the DB config that will be used to create the value
_ Name of the type corresponding to the struct to be created
_ A array of list containing the values required to populate the struct. Values must be ordered
following the order in which they are declared in type definition.
In order to work, this function requires an active transaction on the provided DB config. This
requirement is forced so created values are used inside the same connection and to avoid leaked
connections.| Modifier and Type | Field and Description |
|---|---|
static String |
DB_CREATE_STRUCT_FUNCTION |
INVALID_ARGUMENT_NUMBER, INVALID_DB_CONFIG_ARGUMENT, INVALID_STRUCT_VALUES_ARGUMENT, INVALID_TYPE_NAME_ARGUMENT| Modifier and Type | Method and Description |
|---|---|
protected Object |
createValue(DbConnection connection,
String typeName,
Object[] values)
Creates the structured type value
|
protected String |
getFunctionName() |
callpublic static final String DB_CREATE_STRUCT_FUNCTION
protected Object createValue(DbConnection connection, String typeName, Object[] values) throws SQLException
AbstractDbFunctioncreateValue in class AbstractDbFunctionconnection - connection used to create the value.typeName - name of the user defined typevalues - values that conform the estructured type.SQLException - if there is any DB related error when creating the valueprotected String getFunctionName()
getFunctionName in class AbstractDbFunctionCopyright © 2003–2020 MuleSoft, Inc.. All rights reserved.