sqlite

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSqlite

func GetSqlite() *gorm.DB

func SetSqlite

func SetSqlite()

Types

type History

type History struct {
	Id       int64          `gorm:"primaryKey;autoIncrement;comment:主键"`
	Title    string         `gorm:"comment:标题"`
	CreateAt time.Time      `gorm:"autoCreateTime;comment:创建时间"`
	UpdateAt time.Time      `gorm:"autoUpdateTime;comment:更新时间"`
	DeleteAt gorm.DeletedAt `gorm:"index;comment:删除时间"`
}

func (*History) Delete

func (h *History) Delete() error

func (*History) ExistsByTitle

func (h *History) ExistsByTitle() (bool, error)

func (*History) GetAll

func (h *History) GetAll() ([]History, error)

func (*History) GetById

func (h *History) GetById(id int64) error

func (*History) GetByTitle

func (h *History) GetByTitle(title string) error

func (*History) Insert

func (h *History) Insert() error

func (*History) Sync

func (h *History) Sync()

func (*History) Update

func (h *History) Update() error

Jump to

Keyboard shortcuts

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