Documentation ¶
Index ¶
- type MySQLDB
- func (mysqlDB *MySQLDB) Count() (int, error)
- func (mysqlDB *MySQLDB) Delete() (sql.Result, error)
- func (mysqlDB *MySQLDB) Execute(query string, args ...interface{}) (sql.Result, error)
- func (mysqlDB *MySQLDB) Fields(fields ...string) *MySQLDB
- func (mysqlDB *MySQLDB) First(queryResult interface{}) error
- func (mysqlDB *MySQLDB) Insert(ModelData model.MySQLModel) (sql.Result, error)
- func (mysqlDB *MySQLDB) Migrate(db_name string, model model.MySQLModel)
- func (mysqlDB *MySQLDB) Name() string
- func (mysqlDB *MySQLDB) OrderBy(orders ...string) *MySQLDB
- func (mysqlDB *MySQLDB) Page(page int, pagesize int) (int, int, error)
- func (mysqlDB *MySQLDB) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (mysqlDB *MySQLDB) Select(queryResult interface{}) error
- func (mysqlDB *MySQLDB) SetModel(model model.MySQLModel) *MySQLDB
- func (mysqlDB *MySQLDB) Update(ModelData model.MySQLModel) (sql.Result, error)
- func (mysqlDB *MySQLDB) Where(query string, args ...interface{}) *MySQLDB
- type SQLite3DB
- func (sqlite3DB *SQLite3DB) Count() (int, error)
- func (sqlite3DB *SQLite3DB) Delete() (sql.Result, error)
- func (sqlite3DB *SQLite3DB) Execute(query string, args ...interface{}) (sql.Result, error)
- func (sqlite3DB *SQLite3DB) Fields(fields ...string) *SQLite3DB
- func (sqlite3DB *SQLite3DB) First(queryResult interface{}) error
- func (sqlite3DB *SQLite3DB) Insert(ModelData model.SQLite3Model) (sql.Result, error)
- func (sqlite3DB *SQLite3DB) Migrate(db_name string, model model.SQLite3Model)
- func (sqlite3DB *SQLite3DB) Name() string
- func (sqlite3DB *SQLite3DB) OrderBy(orders ...string) *SQLite3DB
- func (sqlite3DB *SQLite3DB) Page(page int, pagesize int) (int, int, error)
- func (sqlite3DB *SQLite3DB) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (sqlite3DB *SQLite3DB) Select(queryResult interface{}) error
- func (sqlite3DB *SQLite3DB) SetModel(model model.SQLite3Model) *SQLite3DB
- func (sqlite3DB *SQLite3DB) Update(ModelData model.SQLite3Model) (sql.Result, error)
- func (sqlite3DB *SQLite3DB) Where(query string, args ...interface{}) *SQLite3DB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQLDB ¶ added in v1.0.12
func MySQLConnect ¶ added in v1.0.12
连接 MySQL 数据库
func (*MySQLDB) Migrate ¶ added in v1.3.1
func (mysqlDB *MySQLDB) Migrate(db_name string, model model.MySQLModel)
模型迁移
func (*MySQLDB) SetModel ¶ added in v1.0.12
func (mysqlDB *MySQLDB) SetModel(model model.MySQLModel) *MySQLDB
设置使用模型
type SQLite3DB ¶ added in v1.0.12
func SQLite3Connect ¶ added in v1.0.12
连接 SQLite3 数据库
func (*SQLite3DB) Migrate ¶ added in v1.3.1
func (sqlite3DB *SQLite3DB) Migrate(db_name string, model model.SQLite3Model)
模型迁移
func (*SQLite3DB) SetModel ¶ added in v1.0.12
func (sqlite3DB *SQLite3DB) SetModel(model model.SQLite3Model) *SQLite3DB
设置使用模型
Click to show internal directories.
Click to hide internal directories.