Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/dso/deps.ts>Connection

Simple Orm library for Deno based on deno_mysql
Latest
class Connection
import { Connection } from "https://deno.land/x/dso@v1.0.0/deps.ts";

Connection for mysql

Constructors

new
Connection(client: Client)

Properties

private
optional
conn: Deno.Conn
capabilities: number
serverVersion: string
state: ConnectionState

Methods

private
_connect()
private
lessThan57(): Boolean

Check if database server version is less than 5.7.0

MySQL version is "x.y.z" eg "5.5.62"

MariaDB version is "5.5.5-x.y.z-MariaDB[-build-infos]" for versions after 5 (10.0 etc) eg "5.5.5-10.4.10-MariaDB-1:10.4.10+mariabionic" and "x.y.z-MariaDB-[build-infos]" for 5.x versions eg "5.5.64-MariaDB-1trusty"

private
nextPacket(): Promise<ReceivePacket>
close(): void

Close database connection

connect(): Promise<void>

Connect to database

execute(sql: string, params?: any[]): Promise<ExecuteResult>

excute sql

query(sql: string, params?: any[]): Promise<ExecuteResult | any[]>

excute query sql