Command DB

A command line springboot application (using standard JDBC, spring JDBC variants) that can be used to execute script against any generic Db. A very simplified dumbed-down version of a generic db client.

Usage

Can be used to test connectivity, driver configuration in Java based applications

Compatibility

Current support is for postgres, edb, h2 (embedded)

Sample Data Initialization

For H2 DB
  • DDLs : schema-h2.sql
  • Dataset data-h2.sql
  • Command Line Execution

    Require 2 command-line parameters for execution:
  • parameter 1: query type: "C"-Create, "R"-Retrieve
  • parameter 2: query string
  • Command Format:
    java -jar target/command-db-0.0.1-SNAPSHOT.JAR [type] [query]

    Example:
    java -jar target/command-db-0.0.1-SNAPSHOT.jar "R" "select * from departments"