scope

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: MIT, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewScope

func NewScope(field string, op sql.ConditionOperation, args ...interface{}) func(*gorm.DB) *gorm.DB

Types

type ChainScope

type ChainScope []func(db *gorm.DB) *gorm.DB

var dao ChainScope dao.ById(1),ByName("a").Exec(db).First(v)

func (ChainScope) ById

func (c ChainScope) ById(id any) ChainScope

func (ChainScope) ByName

func (c ChainScope) ByName(name any) ChainScope

func (ChainScope) Exec

func (c ChainScope) Exec(db *gorm.DB) *gorm.DB

type FilterExprs

type FilterExprs dbi.FilterExprs

func (FilterExprs) Build

func (f FilterExprs) Build(db *gorm.DB) *gorm.DB

type Scope

type Scope func(*gorm.DB) *gorm.DB

Jump to

Keyboard shortcuts

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