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 480 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 483 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 609 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 612 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 647 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 877 days ago