class Connection
extends EventEmitter
import { Connection } from "https://deno.land/x/mysql2@v1.0.6/lib/connection.ts";
Constructors
new
Connection(opts: { config: ConnectionConfig; })Properties
_handshakePacket: Packet | null
_outOfOrderPackets: Packet[]
_pool: Pool | undefined | null
_statements: LRU<any, any>
config: ConnectionConfig
packetParser: PacketParser
stream: Socket
Methods
_bumpCompressedSequenceId(numPackets: number)
_handleNetworkError(err: Error)
addCommand(cmd: Command)
beginTransaction(cb: any)
close()
commit(cb: any)
connect(cb: any)
createBinlogStream(opts: any)
destroy()
end(callback?: any): any
escape(value: string)
escapeId(value: string)
execute()
sql: string,
values?: any,
cb?: any,
format(sql: string, values?: any)
handlePacket(packet?: Packet)
pause()
ping(cb: any)
pipe()
prepare(options: any, cb: Function)
protocolError(message?: string, code?: string | number)
query()
sql?: any,
values?: any,
cb?: any,
raw(sql: string)
resume()
rollback(cb: any)
serverHandshake(args?: any)
startTLS(_onSecure: () => void)
unprepare(sql: string)
writeColumns(columns: any)
writeEof(warnings?: any, statusFlags?: any)
writeError(args?: any)
writeOk(args?: any)
writePacket(packet: Packet)
writeTextResult(rows: any, columns: any)
writeTextRow(column: any)
Static Methods
createQuery()
sql: any,
values: any,
cb: any,
config: any,
statementKey(options: any)