Giter VIP home page Giter VIP logo

derbydump's People

Contributors

3awsomies avatar ari avatar daczo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

derbydump's Issues

assure product sql does not rise 'packet too large'

'INSERT INTO ... VALUES ...' is a good syntax, yet for large databases its possible that the generated statement will be even larger than 1Gb (mysql maximum possible length of query)

Safeguard is required, maybe by specifying another property
output.maxInsertSize = 16Mb

then inside the code the 'INSERT' statement has to be broken down into several smaller ones, each smaller than 16Mb.
(or throw exception if not possible, for example due to a large CLOB value)

lack of output

Unless there is a severe error, there is no indication of any sort of what is happening (or what has happened) when running the app.

I see this in terminal regardless if the application succeeds or fails:

$ java -jar target/exporter-0.0.1-SNAPSHOT-jar-with-dependencies.jar
$

Did the application find the source database? Did it succeed to login? were there problems with file permissions to create output folder? no clue...

Just some sample output I'd like to see

$ java -jar target/exporter-0.0.1-SNAPSHOT-jar-with-dependencies.jar
DerbyDump starting, attempting to connect to database...
Cannot locate configuration file, please refer to README.MD
$

$ java -jar target/exporter-0.0.1-SNAPSHOT-jar-with-dependencies.jar
DerbyDump starting, attempting to connect to database...
Database connection unsuccessful, please verify the connection settings in

$

$ java -jar target/exporter-0.0.1-SNAPSHOT-jar-with-dependencies.jar
DerbyDump starting, attempting to connect to database...
Database connection successful, generating output...
Operation completed, output saved to
$

problems with config and defaults

The specification states that the application is mean to to be a standalone program.

After 20 minutes of trying I cannot still figure out how to start up the program with a given set of parameters. (unless I edit 'src/main/resources/dump.properties' file and re-package the jar)

The dump.properties file should not be a part of distribution jar, but user provided file (preferably read from the directory where program is executed form)

Also some properties should have default values (ie. dump.buffer.size), and be only optional in the configuration/properties file.

foreign key constraints

The dump file has to be easily usable on any database, in particular a database with full schema, including foreign key indices.

Writing sql dump dealing with indexes might be hard, but luckily we only focus on mysql flavour, where such operations are easy.

I propose the following

  • add another startup parameter called 'output.sql.flavour'. Default is mysql. We dont need any other flavour at the moment, but it will allow other opensource contributors to easily enhance this project.
  • add another startup parameter called 'output.sql.ignoreFKConstraints'. Default to true.
  • if ignoreFKConstraints == true and sql.flavour == mysql then adding
    'SET FOREIGN_KEY_CHECKS = 0;' on start and
    'SET FOREIGN_KEY_CHECKS = 1;' at the end of sql dump will do the trick.

java 6 and gradlew

I have java 6, gradlew is not compiling.

It should be at least mentioned in the readme that Java7 is needed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.