storage

package
v0.0.0-...-e1f3ccc Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const CHANGE_MARK_SQL = `UPDATE mark SET mark=?, description=?, color=?, icon=? WHERE id=?;`
View Source
const CREATE_MARK_TABLE_SQL = `` /* 248-byte string literal not displayed */
View Source
const DELETE_MARK_SQL = `DELETE FROM mark WHERE id = ?;`
View Source
const INSERT_MARK_SQL = `INSERT INTO mark (mark, description, color, icon) VALUES(?,?,?,?);`
View Source
const QUERY_MARK_SQL = `SELECT * FROM mark WHERE id=?;`
View Source
const RENAME_MARK_SQL = `UPDATE mark SET mark=? WHERE id=?;`
View Source
const TABLE_FILE_NAME = "mark.db"

Variables

This section is empty.

Functions

func ChangeMark

func ChangeMark(id int, mark *Mark) bool

func Connection

func Connection(dbfile string, callback func(db *sql.DB))

func CreateTable

func CreateTable()

func GetMarkTable

func GetMarkTable(root bool) string

func InsertMark

func InsertMark(data CreateMark) bool

func RemoveMark

func RemoveMark(id int) bool

func RenameMark

func RenameMark(id int, name string) bool

Types

type CreateMark

type CreateMark struct {
	Mark        string
	Description string
	Color       string
	Icon        string
}

type Mark

type Mark struct {
	CreateMark
	Id        int
	Sort      int
	CreatedAt string
	ModifyAt  string
}

func QueryMark

func QueryMark(id int) (Mark, error)

func QueryMarks

func QueryMarks() []Mark

Jump to

Keyboard shortcuts

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