mysql

package
v0.0.0-...-2946602 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BASIC_MODEL_CREATED_AT  = "created_at"
	BASIC_MODEL_UPDATED_AT  = "updated_at"
	BASIC_MODEL_DELETED_AT  = "deleted_at"
	BASIC_MODEL_PRIMARY_KEY = "id"
)

Variables

This section is empty.

Functions

func CalcMysqlBatchSize

func CalcMysqlBatchSize(data interface{}) int

CalcMysqlBatchSize 批量插入时计算长度的

func Deserialize

func Deserialize(sourceData []byte, destStruct interface{}) error

Deserialize ...

func InitBatchSqlGeneration

func InitBatchSqlGeneration() *batchSqlGeneration

func InitSqlGeneration

func InitSqlGeneration(model schema.Tabler, selected Selected) *sqlGeneration

InitSqlGeneration 初始化

func IsInnerStruct

func IsInnerStruct(structField reflect.StructField) bool

Types

type OperatorSymbol

type OperatorSymbol string

OperatorSymbol 。。。

const (
	EQUAL              OperatorSymbol = "="
	LIKE               OperatorSymbol = "like"
	IN                 OperatorSymbol = "in"
	NULL               OperatorSymbol = "is null"
	NOT_NULL           OperatorSymbol = "is not null"
	GREATER_THEN       OperatorSymbol = ">"
	GREATER_THEN_EQUAL OperatorSymbol = ">="
	LESS_THAN          OperatorSymbol = "<"
	LESS_THAN_EQUAL    OperatorSymbol = "<="
	NOT_EQUAL          OperatorSymbol = "<>"
)

type Selected

type Selected string
const (
	COUNT        Selected = "count(*)"
	ALL          Selected = "*"
	DISTINCT_ALL Selected = " DISTINCT * "
)

Jump to

Keyboard shortcuts

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