db

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package db is the host-side bridge between.lsc code and Go's database/sql. The package itself is driver-agnostic — drivers are registered via blank imports in companion files gated by build tags. To add a new driver (e.g. sqlite, mysql) drop a `driver_<name>.go` next to this file with a `//go:build` line and a `_ "..."` import. To omit the default Postgres driver, build with `-tags.lsc_no_postgres`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDBPreload

func RegisterDBPreload(v *vm.VM)

RegisterDBPreload installs a single loader entry. The loader is a GoFunc that returns the module table — `require` runs it on first call, caches the result in `package.loaded`, and returns the cache on every subsequent `require("db")`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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