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 497 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 500 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 626 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 628 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 663 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 893 days ago