react-sqljs-demo icon indicating copy to clipboard operation
react-sqljs-demo copied to clipboard

Load test.db sqlite database demo file

Open eSlider opened this issue 5 years ago • 2 comments

As discussed in previous PR I improved live-demo by add database file load example to become abilities run SQL queries on it.

Changes

  • [x] Download demo sqlite database file using fetch
  • [x] Prepare downloaded file to handle it right ( ArrayBuffer => Uint8Array )
  • [x] Add default select SQL query in textearea

eSlider avatar Jun 14 '20 19:06 eSlider

Nice !

Two little things :

  • it would be good if the example database would have a little more data, to let people play around with joins and filters. You can use for instance the Dallas Police Officer-Involved Shootings from this page: http://2016.padjo.org/tutorials/sqlite-data-starterpacks/
  • The default query should be executed immediately once the database has been loaded.

It's can be done. But about the hype: I prefer to use more neutral demo file. Do you have better option?

eSlider avatar Jun 15 '20 12:06 eSlider

It's can be done. But about the hype: I prefer to use more neutral demo file. Do you have better option?

The Dallas Police Officer-Involved Shootings is great. It is small enough to load quickly, is not copyrighted, and contains interesting public data, with several tables that can be joined. If you find or create another database that meets these criteria and want to include it instead, go ahead; but I don't think the Dallas PD data has any reason for being controversial.

lovasoa avatar Jun 15 '20 12:06 lovasoa