sqlFunc

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToJsStu

func ToJsStu(vm *goja.Runtime, stu any) goja.Value

Types

type CreateOneRet

type CreateOneRet struct {
	Err          error `json:"err"`
	LastInsertId int64 `json:"lastInsertId"` //最后更新的id
	RowsAffected int64 `json:"rowsAffected"` //受影响的行数
}

type ErrRet

type ErrRet struct {
	Err error `json:"err"`
}

type SqlFunc

type SqlFunc struct {
	SvcCtx *svc.ServiceContext

	Task *domain.TaskInfo

	ExecuteLog []*domain.ScriptLog
	TaskSend   TaskSendFunc
	SelectNum  int64 //查询的数量
	ExecNum    int64 //执行的数量

	logx.Logger
	// contains filtered or unexported fields
}

func NewSqlFunc

func NewSqlFunc(ctx context.Context, svcCtx *svc.ServiceContext, task *domain.TaskInfo, TaskSend TaskSendFunc, vm *goja.Runtime) *SqlFunc

func (*SqlFunc) CreateOne

func (s *SqlFunc) CreateOne() func(in goja.FunctionCall) goja.Value

func (*SqlFunc) Exec

func (s *SqlFunc) Exec() func(in goja.FunctionCall) goja.Value

func (*SqlFunc) Get

func (s *SqlFunc) Get() func(in goja.FunctionCall) goja.Value

func (*SqlFunc) GetEnv

func (s *SqlFunc) GetEnv() func(in goja.FunctionCall) goja.Value

func (*SqlFunc) GetHashField

func (s *SqlFunc) GetHashField(field string) string

func (*SqlFunc) GetHashFieldWithDay

func (s *SqlFunc) GetHashFieldWithDay(field string, day int) string

func (*SqlFunc) GetHashKey

func (s *SqlFunc) GetHashKey(key string) string

func (*SqlFunc) GetStringKey

func (s *SqlFunc) GetStringKey(key string) string

func (*SqlFunc) HGetAll

func (s *SqlFunc) HGetAll() func(in goja.FunctionCall) goja.Value

func (*SqlFunc) Hdel

func (s *SqlFunc) Hdel() func(in goja.FunctionCall) goja.Value

func (*SqlFunc) Hexists

func (s *SqlFunc) Hexists() func(in goja.FunctionCall) goja.Value

func (*SqlFunc) Hget

func (s *SqlFunc) Hget() func(in goja.FunctionCall) goja.Value

func (*SqlFunc) Hset

func (s *SqlFunc) Hset() func(in goja.FunctionCall) goja.Value

func (*SqlFunc) LogError

func (s *SqlFunc) LogError() func(in goja.FunctionCall) goja.Value

func (*SqlFunc) LogInfo

func (s *SqlFunc) LogInfo() func(in goja.FunctionCall) goja.Value

func (*SqlFunc) Register

func (s *SqlFunc) Register() error

func (*SqlFunc) Select

func (s *SqlFunc) Select() func(in goja.FunctionCall) goja.Value

func (*SqlFunc) Set

func (s *SqlFunc) Set() func(in goja.FunctionCall) goja.Value

func (*SqlFunc) TaskSendSqlJs

func (s *SqlFunc) TaskSendSqlJs() func(in goja.FunctionCall) goja.Value

func (*SqlFunc) ToRealHashField

func (s *SqlFunc) ToRealHashField(field string) string

type TaskSend

type TaskSend struct {
	Code        string            `json:"code"` //任务编码
	ExecContent string            `json:"execContent"`
	Param       map[string]string `json:"param"`
	Sql         string            `json:"sql"`
}

type TaskSendFunc

type TaskSendFunc func(context.Context, *timedjob.TaskSendReq) error

Jump to

Keyboard shortcuts

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