mirror of
https://github.com/injoyai/tdx.git
synced 2025-11-26 21:25:35 +08:00
增加tdx.DialWorkday
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
|||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
"github.com/injoyai/base/maps"
|
"github.com/injoyai/base/maps"
|
||||||
"github.com/injoyai/conv"
|
"github.com/injoyai/conv"
|
||||||
|
"github.com/injoyai/ios/client"
|
||||||
"github.com/injoyai/logs"
|
"github.com/injoyai/logs"
|
||||||
"github.com/injoyai/tdx/protocol"
|
"github.com/injoyai/tdx/protocol"
|
||||||
"github.com/robfig/cron/v3"
|
"github.com/robfig/cron/v3"
|
||||||
@@ -16,6 +17,14 @@ import (
|
|||||||
"xorm.io/xorm"
|
"xorm.io/xorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func DialWorkday(op ...client.Option) (*Workday, error) {
|
||||||
|
c, err := DialDefault(op...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return NewWorkdaySqlite(c)
|
||||||
|
}
|
||||||
|
|
||||||
func NewWorkdayMysql(c *Client, dsn string) (*Workday, error) {
|
func NewWorkdayMysql(c *Client, dsn string) (*Workday, error) {
|
||||||
|
|
||||||
//连接数据库
|
//连接数据库
|
||||||
|
|||||||
Reference in New Issue
Block a user