Connect to a database
Before going any further, you will need to connect to your database.
import { Database, YourDatabaseConnector } from 'https://deno.land/x/denodb/mod.ts';
// SQLite3Connector, MySQLConnector, PostgresConnector...
const connector = new YourDatabaseConnector({ ... });
const db = new Database(connector);
// If you need debug logs, set `debug` to `true`
const db = new Database(
connector,
debug: true,
);
Depending on the dialect, you might need different options: