import pg from "../postgres.js"; // Imports import { insertQuery, selectWhereAnyQuery, updateWhereAnyQuery, } from "../pg-query.js"; // Constants const table = "tests"; const PG_DISABLED = process.env.POSTGRES_DISABLED; import { testsMock, mappingsMock } from "../mocks/catalog-mock.js"; // Queries export const getTests = async () => { if (PG_DISABLED) return testsMock(); const query = `SELECT * from ${table}`; return pg.query(query); }; export const getPipelineMappings = async () => { if (PG_DISABLED) return mappingsMock(); const query = `SELECT * from ${table}`; return pg.query(query); }; export const getProjects = async () => { if (PG_DISABLED) { const tests = testsMock(); } };