gristlabs_grist-core/test
Paul Fitzpatrick ec8ab598cb (core) add a yarn run cli tool, and add a sqlite gristify option
Summary:
This adds rudimentary support for opening certain SQLite files in Grist.

If you have a file such as `landing.db` in Grist, you can convert it to Grist format by doing (either in monorepo or grist-core):
```
yarn run cli -h
yarn run cli sqlite -h
yarn run cli sqlite gristify landing.db
```

The file is now openable by Grist. To actually do so with the regular Grist server, you'll need to either import it, or convert some doc you don't care about in the `samples/` directory to be a soft link to it (and then force a reload).

This implementation is a rudimentary experiment. Here are some awkwardnesses:
 * Only tables that happen to have a column called `id`, and where the column happens to be an integer, can be opened directly with Grist as it is today. That could be generalized, but it looked more than a Gristathon's worth of work, so I instead used SQLite views.
 * Grist will handle tables that start with an uncapitalized letter a bit erratically. You can successfully add columns, for example, but removing them will cause sadness - Grist will rename the table in a confused way.
 * I didn't attempt to deal with column names with spaces etc (though views could deal with those).
 * I haven't tried to do any fancy type mapping.
 * Columns with constraints can make adding new rows impossible in Grist, since Grist requires that a row can be added with just a single cell set.

Test Plan: added small test

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3502
2022-07-14 12:00:30 -04:00
..
fixtures (core) Nice summary table IDs 2022-07-14 12:09:56 +02:00
gen-server (core) add missing tsconfig file that affects IDEs 2022-05-27 13:48:58 -04:00
nbrowser (core) Faster builds all around. 2022-07-04 10:42:40 -04:00
server (core) add a yarn run cli tool, and add a sqlite gristify option 2022-07-14 12:00:30 -04:00
chai-as-promised.js (core) Faster builds all around. 2022-07-04 10:42:40 -04:00
init-mocha-webdriver.js Correct spelling mistakes 2022-02-19 09:46:49 +00:00
mocha.opts (core) Faster builds all around. 2022-07-04 10:42:40 -04:00
report-why-tests-hang.js (core) Move report-why-tests-hang helper to core 2021-04-26 23:52:16 -04:00
test_under_docker.sh (core) run test:docker target prior to pushing grist-core image 2021-12-14 14:22:02 -05:00
testUtils.ts (core) add missing tsconfig file that affects IDEs 2022-05-27 13:48:58 -04:00
tsconfig.json (core) Faster builds all around. 2022-07-04 10:42:40 -04:00
xunit-file.js (core) Parallelize jenkins by running on multiple machines. 2022-07-01 16:18:36 -04:00