d1

package
v0.2.17 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDatabaseNotFound = Err(errPrefix + "database not found")

Functions

func NewLocal added in v0.2.16

func NewLocal(path string) (*orm.DB, error)

NewLocal opens a local SQLite database for host use (dev + tests) — no Cloudflare credentials, no network. D1 is SQLite under the hood and orm uses the same sqlt compiler in every context, so behavior matches the edge (NewEdge). Only the data location differs.

path is a SQLite DSN: a file ("goflare-local.db") to persist across restarts, or ":memory:" for an ephemeral per-process database (tests).

Types

This section is empty.

Jump to

Keyboard shortcuts

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