DB::CONNECT 1g 2025-07-04 laplante@plcb.ca GOWEB/Database


title: “DB::CONNECT Function” date: 2025-07-04 author: “laplante@plcb.ca” version: “1.0.0”

module: “GOWEB/Database”

Name

db::connect — establish and return a database connection

Synopsis

db::open(dsn)

Description

The db::connect function opens a database connection and returns a database object.
It should be called before performing any SQL operations and closed afterwards to free resources.

Examples

dsn := "goweb:goweb@tcp(127.0.0.1:3306)/goweb";
db := db::connect(dsn);
sql(db:db, "show tables");
db::close(db);

Author

laplante@plcb.ca

See also

Version History