Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonatan-ivanov/grdb
Dummy DB tester CLI app on the JVM
https://github.com/jonatan-ivanov/grdb
database db groovy
Last synced: 19 days ago
JSON representation
Dummy DB tester CLI app on the JVM
- Host: GitHub
- URL: https://github.com/jonatan-ivanov/grdb
- Owner: jonatan-ivanov
- Created: 2018-10-15T03:46:05.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2021-05-09T03:51:51.000Z (over 3 years ago)
- Last Synced: 2025-01-06T14:56:34.525Z (21 days ago)
- Topics: database, db, groovy
- Language: Groovy
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# grdb
Dummy DB tester CLI app on the JVM.
Just a siple script which downloads and uses the DB driver of your choice, runs your Groovy [script](http://docs.groovy-lang.org/latest/html/documentation/#_interacting_with_a_sql_database) (see: [Sql JavaDoc](http://docs.groovy-lang.org/latest/html/api/groovy/sql/Sql.html)) and prints out the result in JSON.[![asciicast](https://asciinema.org/a/206545.png)](https://asciinema.org/a/206545)
# Command Examples
```
./grdb.groovy --dependency mysql:mysql-connector-java:8.+ --driver com.mysql.cj.jdbc.Driver --url jdbc:mysql://localhost:3306/testDB --username test --password secret
```
```
./grdb.groovy --dependency mysql:mysql-connector-java:8.+ --driver com.mysql.cj.jdbc.Driver --url jdbc:mysql://localhost:3306/testDB --username test --password secret "sql.rows 'SELECT * FROM testTable'"
```
```
./grdb.groovy --dependency net.sourceforge.jtds:jtds:1.+ --driver net.sourceforge.jtds.jdbc.Driver --url jdbc:jtds:sqlserver://localhost:1433/testDB --username test --password secret "sql.rows 'SELECT * FROM testTable'"
```# Query Examples
```
sql.rows 'select * from table'
sql.firstRow 'select * from table'
sql.execute 'insert into table (name) values ("John Doe")'
```