Skip to content

Commit

Permalink
Add simple driver verification tool
Browse files Browse the repository at this point in the history
  • Loading branch information
kdubb committed May 25, 2021
1 parent d672581 commit c988867
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions verify/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.class
11 changes: 11 additions & 0 deletions verify/Verify.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import java.sql.*;

public class Verify {

public static void main(String[] args) throws SQLException {
DatabaseMetaData metaData = DriverManager.getConnection(args[0]).getMetaData();
String product = metaData.getDatabaseProductName() + " (" + metaData.getDatabaseProductVersion() + ")";
System.out.println("Success: " + product);
}

}
6 changes: 6 additions & 0 deletions verify/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

script_path=$(dirname "${BASH_SOURCE[0]}")

javac "$script_path"/Verify.java
java -cp "$script_path:$1" Verify "${2:-jdbc:pgsql://test:test@localhost:5432/test}"

0 comments on commit c988867

Please sign in to comment.