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 + ";"));
