import { Client } from "https://deno.land/x/mysql/mod.ts";
const client = await new Client().connect({
hostname: "127.0.0.1",
port: 3306,
username: "root",
db: "test",
poolSize: 10,
password: "123456",
});
let result = await client.execute(`INSERT INTO users(name) values(?)`, [
"manyuanrong",
]);
console.log(result);
await client.close();
控制台输出:
error: Uncaught (in promise) Error: Not supported
throw new Error(“Not supported”);