Skip to content

Commit d13d11f

Browse files
author
Pavel Zavora
committed
chore: improve docs
1 parent 2968bdc commit d13d11f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ The tool ignores missing tables and columns when importing the data.
1616
* *password*
1717
3. Export to a zip file
1818
* jdbcimage export -url=jdbc:mariadb://localhost:3306/qa -user=root -password=root mysql.zip
19-
* jdbcimage export -url=jdbc:postgresql://localhost:5432/inttests?currentSchema=qa -user=postgres -password=postres postgres.zip
19+
* jdbcimage export -url=jdbc:postgresql://localhost:5432/inttests?stringtype=unspecified&currentSchema=qa -user=postgres -password=postres postgres.zip
2020
* jdbcimage export -url=jdbc:oracle:thin:@localhost:1521:XE -user=system -password=changeit oracle.zip
2121
* jdbcimage export -url=jdbc:sqlserver://localhost:1433;databaseName=XE -user=sa -password=changeit sqlserver.zip
2222
4. Import from a zip file
2323
* BEWARE: !!!import deletes data from all tables contained in the imported zip file!!!
2424
* jdbcimage import -url=jdbc:mariadb://localhost:3306/qa -user=root -password=root -ignored_tables=SCHEMAVERSION postgres.zip
2525
* jdbcimage import -url=jdbc:postgresql://localhost:5432/inttests?stringtype=unspecified&currentSchema=qa -user=postgres -password=postres -ignored_tables=schemaversion mysql.zip
26+
* `stringtype=unspecified` is required in the connection string in order to import data that map to JDBC OTHER type, such as json or jsonb
2627
* jdbcimage -Xmx1024m import -url=jdbc:oracle:thin:@localhost:1521:XE -user=system -password=changeit -ignored_tables=SCHEMAVERSION mysql.zip
2728
* jdbcimage import -url=jdbc:sqlserver://localhost:1433;databaseName=XE -user=sa -password=changeit -ignored_tables=SCHEMAVERSION mysql.zip
2829
5. Take a look at table data in a zip file

src/main/java/io/github/sranka/jdbcimage/db/DbImportResultConsumer.java

-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ public void accept(RowData t) {
210210
break;
211211
case Types.OTHER:
212212
if (value instanceof String){
213-
// set string, if it was serialized to string
214213
// requires stringtype=unspecified in postgres connection string
215214
stmt.setString(pos, (String)value);
216215
break;

0 commit comments

Comments
 (0)