sample-crystal-db_json

Sample app for streaming db content as ndjson with crystal

db_json sample application

Use ./db/seed-*.sh scripts to initialize a sample database for each driver. Build and start the app with the database_url as command line argument.

$ git clone https://github.com/bcardiff/sample-crystal-db_json.git
$ cd sample-crystal-db_json
$ ./db/seed-chinook.sh
$ crystal src/db_json.cr -- sqlite3://./db/chinook.db

Other connection strings

$ ./db/seed-sqlite3.sh
$ crystal src/db_json.cr -- sqlite3://./db/sqlite3.db
$ ./db/seed-mysql.sh
$ crystal src/db_json.cr -- mysql://root@localhost/db_json_sample
$ ./db/seed-pg.sh
$ crystal src/db_json.cr -- postgres://localhost/db_json_sample

Contributors

  • bcardiff Brian J. Cardiff - creator, maintainer
Repository

sample-crystal-db_json

Owner
Statistic
  • 7
  • 0
  • 0
  • 0
  • 4
  • over 7 years ago
  • December 29, 2016
License

MIT License

Links
Synced at

Wed, 15 May 2024 20:16:14 GMT

Languages