avinassh / avinassh/fast-sqlite3-inserts

Use SQL for generation

Open
#11 10 comments 1 reaction 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.