import { Client } from "https://deno.land/x/mysql/mod.ts"; import dbconfig from "./config.json" assert { type: "json" }; export type WithoutId = Omit; export interface StoccaTreDbConn { query(query: string): Promise; } export default async function createNewDbConnection(): Promise { return await new Client().connect({ hostname: dbconfig.hostname, username: dbconfig.username, db: "stocca_tre", password: dbconfig.password, }); }