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) Exists() (bool, error)
- func (mysqlDB MySQLDB) Fields(fields ...string) *MySQLDB
- func (mysqlDB *MySQLDB) First(queryResult interface{}) error
- func (mysqlDB MySQLDB) GetSQL() string
- func (mysqlDB MySQLDB) GroupBy(groups ...string) *MySQLDB
- func (mysqlDB *MySQLDB) Insert(ModelData mysql.MySQLModel) (sql.Result, error)
- func (mysqlDB *MySQLDB) Migrate(db_name string, model mysql.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 mysql.MySQLModel) *MySQLDB
- func (mysqlDB *MySQLDB) Update(ModelData mysql.MySQLModel) (sql.Result, error)
- func (mysqlDB MySQLDB) Where(query string, args ...interface{}) *MySQLDB
- func (mysqlDB *MySQLDB) WithTransaction(transactionFunc func(mysqlDB *MySQLDB, args ...interface{}) error, ...) error
- 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) Exists() (bool, error)
- func (sqlite3DB SQLite3DB) Fields(fields ...string) *SQLite3DB
- func (sqlite3DB *SQLite3DB) First(queryResult interface{}) error
- func (sqlite3DB SQLite3DB) GetSQL() string
- func (sqlite3DB SQLite3DB) GroupBy(groups ...string) *SQLite3DB
- func (sqlite3DB *SQLite3DB) Insert(ModelData sqlite3.SQLite3Model) (sql.Result, error)
- func (sqlite3DB *SQLite3DB) Migrate(db_name string, model sqlite3.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 sqlite3.SQLite3Model) *SQLite3DB
- func (sqlite3DB *SQLite3DB) Update(ModelData sqlite3.SQLite3Model) (sql.Result, error)
- func (sqlite3DB SQLite3DB) Where(query string, args ...interface{}) *SQLite3DB
- func (sqlite3DB *SQLite3DB) WithTransaction(transactionFunc func(sqlite3DB *SQLite3DB, args ...interface{}) error, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQLDB ¶ added in v1.0.12
func (*MySQLDB) Migrate ¶ added in v1.3.1
func (mysqlDB *MySQLDB) Migrate(db_name string, model mysql.MySQLModel)
模型迁移
func (*MySQLDB) SetModel ¶ added in v1.0.12
func (mysqlDB *MySQLDB) SetModel(model mysql.MySQLModel) *MySQLDB
设置使用模型 return 当前 *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 sqlite3.SQLite3Model)
模型迁移
func (*SQLite3DB) SetModel ¶ added in v1.0.12
func (sqlite3DB *SQLite3DB) SetModel(model sqlite3.SQLite3Model) *SQLite3DB
设置使用模型 return 当前 *SQLite3DB 本身
Click to show internal directories.
Click to hide internal directories.