Skip to main content
Module

x/windmill/mysql.ts>mySql

Windmill deno client (separated from the main repo because most of the code is auto-generated from the openapi and not worth committing)
Go to Latest
function mySql
import { mySql } from "https://deno.land/x/windmill@v1.96.0/mysql.ts";

Execute SQL query. For more info check: https://deno.land/x/mysql2@v1.0.6/mod.ts

Examples

Example 1

const kind = 'cat';
const { rows } = await mySql(db)`SELECT * from pets WHERE kind = ${kind}`;
console.log(rows);

Parameters

db: Resource<"mysql">

the MySQL resource to run sql query for

optional
asObjects = [UNSUPPORTED]