sqlite

package
v0.4.0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (

	// GORM's lifecyle
	HookBeforeCreate = "before_create"
	HookAfterCreate  = "after_create"
	HookBeforeSave   = "before_save"
	HookAfterSave    = "after_save"
	HookBeforeUpdate = "before_update"
	HookAfterUpdate  = "after_update"
	HookBeforeDelete = "before_delete"
	HookAfterDelete  = "after_delete"
	HookAfterFind    = "after_find"
)

Variables

View Source
var (

	// A map of hook to callbacks per GORM’s lifecycle.
	// This allows additional logic to happen when a row is created, updated, deleted, or queried from the database, without changing original model structure or logic.
	// Otherwise we will have to add migration logic from version to version.
	Hooks map[string][]func(*gorm.DB, interface{})
)

Functions

func GetDBByFile

func GetDBByFile(dbFile string) *gorm.DB

func GetGlobalDB

func GetGlobalDB(dbPath string) *gorm.DB

Types

type ContextKey

type ContextKey string

Jump to

Keyboard shortcuts

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