79160838

Date: 2024-11-05 22:17:19
Score: 1
Natty:
Report link

In Studio, the graphical view can help to identify the structure for Parameter Types

Anypoint Studio - Database Operation - Parameter types -> Expression or Bean reference -> Show Graphical View

DataWeave View of Expression or Bean reference at Parameter types

output application/java
---
[{
    key: '' as String,
    typeClassifier: {
        "type": '' as String,
        customType: '' as String
    }
} as Object {
    class : "org.mule.extension.db.api.param.ParameterType"
}]

So, the XML to work needs to be something like:

    <db:insert doc:name="Insert" 
        config-ref="Database_Config_Oracle"
        queryTimeoutUnit="DAYS" 
        autoGenerateKeys="true" 
        parameterTypes="#[[{
    key: 'ID' as String,
    typeClassifier: {
        'type': 'LONGNVARCHAR' as String,
        customType: '' as String
}}]]">
        <db:sql><![CDATA[#[ vars.db.query ]]]></db:sql>
        <db:input-parameters><![CDATA[#[vars.db.inputParameters]]]></db:input-parameters>
        <db:auto-generated-keys-column-names />
    </db:insert> 
Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: AndyDaSilva52