Skip to main content
Module

x/denodb/deps.ts>MySQLClient

MySQL, SQLite, MariaDB, PostgreSQL and MongoDB ORM for Deno
Go to Latest
class MySQLClient
import { MySQLClient } from "https://deno.land/x/denodb@v1.0.40/deps.ts";

MySQL client

Properties

private
optional
_pool: ConnectionPool
config: ClientConfig
readonly
pool

get pool info

Methods

private
createConnection(): Promise<PoolConnection>

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>)