queries

package
v0.0.0-...-a2ff9df Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DynamicGORM

func DynamicGORM[Model any](dbFunc func(*gin.Context) *gorm.DB) *gormdb.GormQueryDriver[Model]

DynamicGORM can be used to control the gorm.DB instance used by the query driver, for example in multi-tenant applications, where the database connection is determined by the request context.

func GORM

func GORM[Model any](db *gorm.DB) *gormdb.GormQueryDriver[Model]

func InMemory

func InMemory[Model any](seed ...Model) *dummy.InMemoryQueryDriver[Model]

Types

type Driver

type Driver[Model any] interface {
	CRUD() *crud.CRUD[Model]

	Pagination() common.Pagination
	Filter() common.QueryMod
	Order() common.QueryMod

	Middleware() []gin.HandlerFunc
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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