import { Client } from "https://deno.land/x/mysql/mod.ts";
type Mysql = {
host: string;
port: number;
user: string;
database: string;
password: string;
ssl: boolean;
};
export async function main(mysql_conn: Mysql, query: string) {
mysql_conn.db = mysql_conn.database;
mysql_conn.hostname = mysql_conn.host;
mysql_conn.username = mysql_conn.user;
const client = await new Client().connect(mysql_conn);
return await client.execute(query);
}
Submitted by admin 466 days ago
import { Client } from "https://deno.land/x/mysql/mod.ts";
type Mysql = {
host: string;
port: number;
user: string;
database: string;
password: string;
ssl: boolean;
};
export async function main(mysql_conn: Mysql, query: string) {
mysql_conn.db = mysql_conn.database;
mysql_conn.hostname = mysql_conn.host;
mysql_conn.username = mysql_conn.user;
const client = await new Client().connect(
mysql_conn,
);
return (await client.execute(query));
}
Submitted by admin 469 days ago
import { Client } from "https://deno.land/x/mysql/mod.ts";
import * as wmill from "https://deno.land/x/windmill@v1.85.0/mod.ts";
export async function main(mysql_conn: wmill.Resource<"mysql">, query: string) {
mysql_conn.db = mysql_conn.database;
mysql_conn.hostname = mysql_conn.host;
mysql_conn.username = mysql_conn.user;
const client = await new Client().connect(
mysql_conn,
);
return (await client.execute(query));
}
Submitted by adam186 595 days ago
import { Client } from "https://deno.land/x/mysql/mod.ts";
import * as wmill from "https://deno.land/x/windmill@v1.85.0/index.ts";
export async function main(mysql_conn: wmill.Resource<"mysql">, query: string) {
mysql_conn.db = mysql_conn.database;
mysql_conn.hostname = mysql_conn.host;
mysql_conn.username = mysql_conn.user;
const client = await new Client().connect(
mysql_conn,
);
return (await client.execute(query));
}
Submitted by adam186 597 days ago
import { Client } from "https://deno.land/x/mysql/mod.ts";
import * as wmill from "https://deno.land/x/windmill@v1.13.0/index.ts";
export async function main(mysql_conn: wmill.Resource<"mysql">, query: string) {
mysql_conn.db = mysql_conn.database;
mysql_conn.hostname = mysql_conn.host;
mysql_conn.username = mysql_conn.user;
const client = await new Client().connect(
mysql_conn,
);
return (await client.execute(query));
}
Submitted by adam186 632 days ago
import { Client } from "https://deno.land/x/mysql/mod.ts";
import * as wmill from "https://deno.land/x/windmill@v1.13.0/index.ts";
export async function main(mysql_conn: wmill.Resource<"mysql">, query: string) {
mysql_conn.db = mysql_conn.database;
mysql_conn.hostname = mysql_conn.host;
mysql_conn.username = mysql_conn.user;
const client = await new Client().connect(
mysql_conn,
);
return (await client.execute(query));
}
Submitted by rossmccrann 862 days ago