sqldb

command
v2.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Command sqldb demonstrates a per-tenant database/sql connection manager.

Each tenant maps to its own DSN, and the manager opens and caches one *sql.DB per tenant on first use. This example registers a tiny no-op driver so it runs without any external dependency. In a real program you would import a real driver, for example:

import _ "github.com/mattn/go-sqlite3" // or modernc.org/sqlite

and pass its driver name to NewManager.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL