sqlite

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Feb 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 Save

type Save struct {
	Id       int64          `gorm:"primaryKey;autoIncrement;comment:主键"`
	FileName string         `gorm:"comment:文件名"`
	Before   string         `gorm:"comment:转换前大小(MB)"`
	After    string         `gorm:"comment:转换后大小(MB)"`
	SaveSize float64        `gorm:"comment:节省(为正数的时候)的空间(MB)"`
	CreateAt time.Time      `gorm:"autoCreateTime;comment:创建时间"`
	UpdateAt time.Time      `gorm:"autoUpdateTime;comment:更新时间"`
	DeleteAt gorm.DeletedAt `gorm:"index;comment:删除时间"`
}

func (*Save) Delete

func (s *Save) Delete() error

func (*Save) GetAll

func (s *Save) GetAll() ([]Save, error)

func (*Save) GetById

func (s *Save) GetById(id int64) error

func (*Save) Insert

func (s *Save) Insert() error

func (*Save) Sync

func (s *Save) Sync()

func (*Save) Update

func (s *Save) Update() error

Jump to

Keyboard shortcuts

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