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

x/denodb/lib/connectors/connector.ts>Connector

MySQL, SQLite, MariaDB, PostgreSQL and MongoDB ORM for Deno
Go to Latest
interface Connector
import { type Connector } from "https://deno.land/x/denodb@v1.1.0/lib/connectors/connector.ts";

Connector interface for a database provider connection.

Properties

readonly
_dialect: string

Database dialect this connector is for.

_translator: Translator

Translator that converts queries to a database-specific command.

Client that maintains an external database connection.

Options to connect to an external instance.

_connected: boolean

Is the client connected to an external instance.

Methods

ping(): Promise<boolean>

Test connection.

_makeConnection(): void

Connect to an external database instance.

query(queryDescription: QueryDescription): Promise<any | any[]>

Execute a query on the external database instance.

optional
transaction(queries: () => Promise<void>): Promise<void>

Execute queries within a transaction on the database instance.

close(): Promise<any>

Disconnect from the external database instance.