db

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*drel.Engine
	Orders *orders.OrderRepository
}

func Open

func Open(dsn string, opts ...drel.Option) (*DB, error)

func (*DB) NewUnitOfWork

func (db *DB) NewUnitOfWork() *UnitOfWork

NewUnitOfWork starts a new change-tracking work session.

type UnitOfWork

type UnitOfWork struct {
	*drel.UnitOfWork
	Orders *orders.UoWOrderRepository
}

UnitOfWork is a change-tracking work session with typed, tracked repositories. Load through uow.<Model>, stage with Add/Remove, then SaveChanges to flush everything in a single transaction.

Jump to

Keyboard shortcuts

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