Skip to Content
fusion-orm
Getting Started

Installation

Add fusion-orm to your module and pick a dialect driver.

Requirements

fusion-orm requires Go 1.27.4 or newer. It is a plain library module — no binaries, no CLI, no CGO.

go get github.com/kiplagatcollins/fusion-orm

The module path is github.com/kiplagatcollins/fusion-orm. Every package you import lives under that path:

  • fusion — the root package: Open, DB, Config, Statement, sentinels.
  • dialect/sqlite and dialect/postgres — the two shipped dialectors.
  • Supporting packages: clause, schema, logger, migrator, dialect/feature.

Dialects and drivers

Two dialects ship in-tree, and each pins its own driver as a module dependency — you install nothing extra beyond the module itself:

DialectPackageDriverVersionNotes
SQLitedialect/sqlitemodernc.org/sqlitev1.62.0Pure Go, CGO-free; registers as "sqlite"
PostgreSQLdialect/postgresgithub.com/jackc/pgx/v5v5.13.0Stdlib adapter; registers as "pgx"

Both drivers are already required by the module's go.mod, so a single go get github.com/kiplagatcollins/fusion-orm pulls them in transitively. You never call the drivers directly — the dialector's Initialize() runs sql.Open(driverName, dsn) for you; you just need the driver on the module graph, which importing the dialect package guarantees.

No separate driver install

Importing dialect/sqlite or dialect/postgres is what registers the underlying database/sql driver (the postgres dialector blank-imports pgx/v5/stdlib for you). There is no _ "modernc.org/sqlite" step.

Minimal imports

A typical program imports the root package plus one dialect:

import (
	"github.com/kiplagatcollins/fusion-orm"
	"github.com/kiplagatcollins/fusion-orm/dialect/sqlite"
)

For PostgreSQL, swap the dialect import:

import (
	"github.com/kiplagatcollins/fusion-orm"
	"github.com/kiplagatcollins/fusion-orm/dialect/postgres"
)

Where next

On this page