db

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// db connections
	DB *gorm.DB

	ErrNotFound = gorm.ErrRecordNotFound
)

Functions

func Create

func Create(val interface{}) *gorm.DB

https://gorm.io/docs/create.html

func Delete

func Delete(val interface{}, conditions ...interface{}) *gorm.DB

https://gorm.io/docs/delete.html

func Find

func Find(q interface{}, args ...interface{}) *gorm.DB

https://gorm.io/docs/query.html#Retrieving-all-objects

func First

func First(v interface{}, where ...interface{}) *gorm.DB

func Init

func Init(addr string) error

func Migrate

func Migrate(vals ...interface{}) error

func Model

func Model(val interface{}) *gorm.DB

func Unscoped

func Unscoped() *gorm.DB

func Update

func Update(val interface{}) *gorm.DB

https://gorm.io/docs/update.html

func Where

func Where(q interface{}, args ...interface{}) *gorm.DB

https://gorm.io/docs/query.html#Conditions

Types

type DeletedAt

type DeletedAt = gorm.DeletedAt

Jump to

Keyboard shortcuts

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