sql_executor

package
v1.2.17 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FieldSql          = "Sql"
	FieldExecutorID   = "ExecutorID"
	FieldExecutorName = "ExecutorName"
	FieldExecutedTime = "ExecutedTime"
)

Variables

View Source
var (
	ColumnSql          = domain.ColumnName(FieldSql)
	ColumnExecutorID   = domain.ColumnName(FieldExecutorID)
	ColumnExecutorName = domain.ColumnName(FieldExecutorName)
	ColumnExecutedTime = domain.ColumnName(FieldExecutedTime)
)

Functions

func Bind added in v0.11.20

func Bind(app *application.App, simple *Simple)

Types

type ExecuteSqlJsonBody

type ExecuteSqlJsonBody struct {
	Sql          string `json:"sql" binding:"required"`
	ExecutorID   string `json:"executorId" binding:"required"`
	ExecutorName string `json:"executorName" binding:"required"`
}

type QuerySqlExecuteLogQueryParams

type QuerySqlExecuteLogQueryParams struct {
	request.BaseQueryParams
	Sql              string `form:"sql"`
	ExecutorID       string `form:"executorId"`
	ExecutorName     string `form:"executorName"`
	StartExecuteTime string `form:"startExecuteTime"`
	EndExecuteTime   string `form:"endExecuteTime"`
}

type Simple

type Simple struct {
	// schema
	Schema string
}

Simple Bind参数

type SqlExecuteLog

type SqlExecuteLog struct {
	value_object.Base
	Sql          string    `sqlmapping:"column:sql;" sqlresult:"column:sql;" check:"required,when=create"`
	ExecutorID   string    `sqlmapping:"column:executor_id;" sqlresult:"column:executor_id;" check:"required,len=32,when=create"`
	ExecutorName string    `sqlmapping:"column:executor_name;" sqlresult:"column:executor_name;" check:"required,lte=256,when=create"`
	ExecutedTime time.Time `sqlmapping:"column:executed_time;" sqlresult:"column:executed_time;"`
}

func (*SqlExecuteLog) DomainCNName

func (sqlExecuteLog *SqlExecuteLog) DomainCNName() string

func (*SqlExecuteLog) DomainCamelName

func (sqlExecuteLog *SqlExecuteLog) DomainCamelName() string

func (*SqlExecuteLog) GetFieldMap added in v1.1.0

func (sqlExecuteLog *SqlExecuteLog) GetFieldMap() map[string]string

type SqlExecuteLogInfo

type SqlExecuteLogInfo struct {
	Sql          string `json:"sql" sqlresult:"sql"`
	ExecutorID   string `json:"executorId" sqlresult:"executor_id"`
	ExecutorName string `json:"executorName" sqlresult:"executor_name"`
	ExecutedTime string `json:"executedTime" sqlresult:"executed_time"`
}

Jump to

Keyboard shortcuts

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