Documentation ¶
Overview ¶
Package sql 数据库/数据处理相关工具
Index ¶
- type Sqlite
- func (db *Sqlite) CanFind(table string, condition string) bool
- func (db *Sqlite) Close() (err error)
- func (db *Sqlite) Count(table string) (num int, err error)
- func (db *Sqlite) Create(table string, objptr interface{}) (err error)
- func (db *Sqlite) Del(table string, condition string) error
- func (db *Sqlite) Find(table string, objptr interface{}, condition string) error
- func (db *Sqlite) FindFor(table string, objptr interface{}, condition string, f func() error) error
- func (db *Sqlite) Insert(table string, objptr interface{}) error
- func (db *Sqlite) InsertUnique(table string, objptr interface{}) error
- func (db *Sqlite) ListTables() (s []string, err error)
- func (db *Sqlite) Open() (err error)
- func (db *Sqlite) Pick(table string, objptr interface{}) error
- func (db *Sqlite) Truncate(table string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sqlite ¶
Sqlite 数据库对象
func (*Sqlite) InsertUnique ¶
InsertUnique 插入数据集 如果 PK 存在会报错 默认结构体的第一个元素为主键 返回错误
func (*Sqlite) ListTables ¶
ListTables 列出所有表名 返回所有表名+错误
Click to show internal directories.
Click to hide internal directories.