XML to SQL DSC

compared with
Current by Lachlan Aldred
on Apr 01, 2009 16:50.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (22)

View page history

 
h3. Component: com.avoka.livecycle.xml2sql 1.0

h3. Operation: performConversion
h3. Operation Title: Convert XML to SQL   (performConversion)
Convert XML to SQL: Convert XML into SQL.
|| Input Parameter || Type || Description || Editor ||
| Repeating Element | java.lang.String | Specify an XPath expression to find the XML repeating element that acts as a source of data to be used in repeated SQL updates statements. That is, a separate SQL update statement will be sent to the Database for each XML element that the XPath expression addresses. For instance, with XPath expression '/process_data/varName/rootNode/repeatingNode', if there are 4 elements of name 'repeatingNode', under an element 'rootNode', then 4 SQL updates will be generated by this solution component.\\ \\
If the insert for any repeating element fails, the entire set will be rolled back.| |
| SQL Statement | java.lang.String | SQL to execute on each iteration. Use '?' for parameters in the SQL statement - these will be replaced at execution time with the value of each parameter.\\ \\
For instance, if there are three parameters defined then your SQL statement would likely take the form 'insert into `DatabaseName`.`TableName` values (?, ?, ?)'.| |
| Parameters | java.lang.String | This is a list of xml sources to be applied into the SQL parameters (i.e. the parts of the SQL query idenfieid by a '?'). Any XPath expressions beginning with a slash ('/') is interpreted as being an self-contained XPath statment. Otherwise it will be appended to the repeating element. \\ \\
Use '#' in the xpath expression to refer to the current repeating index (1-based).| |
| JNDI Data Source | List<List<String>> | This component relies on JNDI (Java Naming and Directory Interface) to obtain a database connection. For example 'java:/IDP_DS' is the JNDI reference of the LiveCycle turn-key MySQL database.\\ \\
New datasources can be added in '%LiveCycleHome%/jboss/server/all/deploy/adobe-ds.xml'| |
 


|| Output Parameter || Type || Description ||
| No. Elements Processed | int | Number of elements processed in the XML. |
| No. Rows Inserted/Modified | int | Number of rows inserted/modified by the SQL statement. |



h3. Operation: performConversionUpdates
h3. Operation Title: Convert XML to SQL with fallback SQL.&nbsp;&nbsp;&nbsp;(performConversionUpdates)
Convert XML to SQL with fallback SQL.: Convert XML into SQL with an alternative (or fallback) SQL update statment for those rows that are already inserted.
|| Input Parameter || Type || Description || Editor ||
| Repeating Element | java.lang.String | Specify an XPath expression to find the XML repeating element that acts as a source of data to be used in repeated SQL updates statements. That is, a separate SQL update statement will be sent to the Database for each XML element that the XPath expression addresses. For instance, with XPath expression '/process_data/varName/rootNode/repeatingNode', if there are 4 elements of name 'repeatingNode', under an element 'rootNode', then 4 SQL updates will be generated by this solution component.\\ \\
If the insert for any repeating element fails, the entire set will be rolled back.| |
| SQL Statement | java.lang.String | SQL to execute on each iteration. Use '?' for parameters in the SQL statement - these will be replaced at execution time with the value of each parameter.\\ \\
For instance, if there are three parameters defined then your SQL statement would likely take the form 'insert into `DatabaseName`.`TableName` values (?, ?, ?)'.| |
| SQL Update Statement | java.lang.String | If insert statement fails due to a forgiegn key violation then this update statement will be used as a fallback measure. Use '?' for parameters in the SQL statement - these will be replaced at execution time with the value of each parameter.\\ \\
For instance, if there are three parameters defined then your SQL statement would likely take the form 'UPDATE `DatabaseName`.`TableName` set `ColumnName` = ? WHERE `Keyname' = ?.| |
| Parameters | java.lang.String | This is a list of xml sources to be applied into the SQL parameters (i.e. the parts of the SQL query idenfieid by a '?'). Any XPath expressions beginning with a slash ('/') is interpreted as being an self-contained XPath statment. Otherwise it will be appended to the repeating element. \\ \\
Use '#' in the xpath expression to refer to the current repeating index (1-based).| |
| JNDI Data Source | List<List<String>> | This component relies on JNDI (Java Naming and Directory Interface) to obtain a database connection. For example 'java:/IDP_DS' is the JNDI reference of the LiveCycle turn-key MySQL database.\\ \\
New datasources can be added in '%LiveCycleHome%/jboss/server/all/deploy/adobe-ds.xml'| |
 


|| Output Parameter || Type || Description ||
| No. Elements Processed | int | Number of elements processed in the XML. |
| No. Rows Inserted/Modified | int | Number of rows inserted/modified by the SQL statement. |