Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it easy to update/insert database table row based on xml data structure #12

Closed
niuxuetao opened this issue Jun 19, 2015 · 1 comment
Milestone

Comments

@niuxuetao
Copy link
Owner

Suppose there is a table called "OldCars" with columns: "plateNumber","brand", "year", "price" and "mileage". You can directly insert into it:

<sqlDataSource 
        url="jdbc:mysql://localhost/test" 
        username="root" password="xxx"/>
<!-- correlation refers to a column name, if the value in the column is found from any row of the table, the row will be first deleted and inserted with new data -->
<sqlInsert table="OldCars" correlation="plateNumber">
  <params>
    <plateNumber>DEBL117887</plateNumber>
    <brand>BMW</brand>
    <year>2010</year>
    <price>8888</price>
    <mileage>10000</milage>
  </params>
</sqlInsert>
@niuxuetao niuxuetao added this to the 1.8 milestone Jun 19, 2015
@niuxuetao
Copy link
Owner Author

done in r1.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant