Savepoint
This commit is contained in:
parent
7db1a3456b
commit
02c483950c
45 changed files with 5136 additions and 256 deletions
18
dev/query.js
Normal file
18
dev/query.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
import {
|
||||
insertQuery,
|
||||
selectWhereAnyQuery,
|
||||
updateWhereAnyQuery,
|
||||
} from "../lib/database/pg-query.js";
|
||||
import { readFileSync } from "fs";
|
||||
var data = JSON.parse(readFileSync("lib/routes/mocks/results.json"));
|
||||
|
||||
var table = "test_results";
|
||||
var queries = data.results.map((r) => insertQuery(table, r));
|
||||
queries.forEach((q) => console.log(q + ";"));
|
||||
|
||||
console.log();
|
||||
|
||||
table = "test_catalog";
|
||||
data = JSON.parse(readFileSync("lib/routes/mocks/catalog.json"));
|
||||
queries = data["tests:full"].map((r) => insertQuery(table, r));
|
||||
queries.forEach((q) => console.log(q + ";"));
|
Loading…
Add table
Add a link
Reference in a new issue