gorms

package module
v0.0.0-...-70333e7 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GormDB

type GormDB interface {
	Migrate(ctx context.Context, models any) (bool, error)
	Create(ctx context.Context, models any) (any, error)
	GetRows(ctx context.Context, models any) (any, error)
	Get(ctx context.Context, models any, fields map[string]any) (any, error)
	GetAll(ctx context.Context, models any) (any, error)
	First(ctx context.Context, models any, id string) (any, error)
	FindAll(ctx context.Context, models any, query string) (any, error)
	Update(ctx context.Context, models any, id string, fields map[string]any) (bool, error)
	Updates(ctx context.Context, model, updaded any) error
	Delete(ctx context.Context, models any, id string) (bool, error)
}

Generic helper wrappers for our differents models

func NewDB

func NewDB(db *gorm.DB) GormDB

Jump to

Keyboard shortcuts

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