Skip to main content
Module

x/cotton/mod.ts>connect

SQL Database Toolkit for Deno
Go to Latest
function connect
import { connect } from "https://deno.land/x/cotton@v0.7.3/mod.ts";

Connect to database and automatically chose the driver

Returns

Promise<Adapter>

Connect to database and automatically chose the driver

Parameters

options: ConnectionConfig

Connection options

Returns

Promise<Adapter>

Connect to database and automatically chose the driver

Parameters

filePath: string

Path to the database configuration file (default: "ormconfig.json")

Returns

Promise<Adapter>