DbUnit Extractor点击查看中文文档
Export database data to XML DbUnit dataset.
Jetbrains DbUnit Extractor plugin page
Copy query results
- Install plugin and set up database connection
- Write SQL query and execute it
- Select rows and columns you want to export
- Right click on selection
- Select "Copy to clipboard as DbUnit XML" from context menu
- Paste result in your .xml file
In-place convert
- Install plugin and set up database connection
- Open xml file for dbunit sample data (it has to starts with "<dataset>")
- Write query you want to convert
- Select query, press ALT+ENTER and choose "Convert query to XML".
Copy selected rows from SQL Console as DbUnit XML. Change SQL query to XML in-place.
Inspired by @rakk web tool for generating DbUnit XML lines.
- Schema name is empty when using "Copy to clipboard as DbUnit XML".
Please synchronize your database. Intellij doesn't return metadata if datasource isn't synchronized.
- "Only one table queries are supported" error when using jTds.
This driver doesn't return metadata by default (issue: https://sourceforge.net/p/jtds/bugs/546/). Please add useCursors=true parameter to your database connection url.
Example: jdbc:jtds:sqlserver://localhost/db;instance=TEST;useCursors=true
- "Only one table queries are supported" error when using Microsoft driver.
Please add selectMethod=cursor parameter to your database connection url.
Example: jdbc:sqlserver://localhost/db;instance=TEST;selectMethod=cursor
This project is licensed under the MIT License.