avinassh / avinassh/fast-sqlite3-inserts
Use SQL for generation
- Dominant language
- Rust
- Stars
- 410
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
What about a using SQLite for test data generation?
## Example:
```sql
CREATE TABLE test (
id INTEGER PRIMARY KEY NOT NULL,
x REAL NOT NULL,
y REAL NOT NULL,
z REAL NOT NULL
);
INSERT INTO test
WITH RECURSIVE
cnt( id, x, y, z) AS (
VALUES(1 , random(), random(), random()) UNION ALL
SELECT id+1,random(),random(), random() FROM cnt WHERE ID<1000)
select * from cnt;
```
https://paulbradley.org/sqlite-test-data/
https://stackoverflow.com/questions/17931320/how-to-insert-random-data-into-a-sqlite-table-using-only-queries
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.