norm

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 2 Imported by: 1

README

NORM

test Go Report Card Go Reference

NORM is Not an ORM.

It does:

  • provide unified CRUD API for your queries;
  • use generics for your types;
  • not generate sql migrations;
  • not generate queries from structs;
  • not manage transactions.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound    = errors.New("not found")
	ErrNotAffected = errors.New("not affected by create/update")
)

Functions

This section is empty.

Types

type ImmutableObject

type ImmutableObject[Model, Args any] struct {
	// contains filtered or unexported fields
}

func NewImmutableObject

func NewImmutableObject[Model, Args any](
	c creator[Model, Args],
	r reader[Model, Args],
) ImmutableObject[Model, Args]

type Object

type Object[Model, Args any] struct {
	// contains filtered or unexported fields
}

func NewObject

func NewObject[Model, Args any](
	c creator[Model, Args],
	r reader[Model, Args],
	u updater[Model, Args],
	d deleter[Model, Args],
) Object[Model, Args]

type PersistentObject

type PersistentObject[Model, Args any] struct {
	// contains filtered or unexported fields
}

func NewPersistentObject

func NewPersistentObject[Model, Args any](
	c creator[Model, Args],
	r reader[Model, Args],
	u updater[Model, Args],
) PersistentObject[Model, Args]

type View

type View[Model, Args any] struct {
	// contains filtered or unexported fields
}

func NewView

func NewView[Model, Args any](r reader[Model, Args]) View[Model, Args]

Directories

Path Synopsis
driver
sql

Jump to

Keyboard shortcuts

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