import { Client } from "https://deno.land/x/deno_nest@v3.15.1/modules/mysql/mod.ts";
MySQL client
Methods
private
createConnection(): Promise<PoolConnection>close()
close connection
connect(config: ClientConfig): Promise<Client>
connect to database
execute(sql: string, params?: any[]): Promise<ExecuteResult>
execute sql
query(sql: string, params?: any[]): Promise<any>
execute query sql
transaction<T = any>(processor: TransactionProcessor<T>): Promise<T>
Execute a transaction process, and the transaction successfully returns the return value of the transaction process
useConnection<T>(fn: (conn: Connection) => Promise<T>)