sql_utils

package
v0.0.0-...-9a50b96 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDeleteSql

func CreateDeleteSql(modelObj model.Model, dataMap map[string]interface{}) string

创建插入SQL语句

func CreateInsertSql

func CreateInsertSql(modelObj model.Model, dataMap map[string]interface{}) string

创建插入SQL语句

func CreateQuerySql

func CreateQuerySql(modelObj model.Model, dataMap map[string]interface{}) string

创建查询SQL语句

func CreateUpdateSql

func CreateUpdateSql(modelObj model.Model, dataMap map[string]interface{}) string

创建更新SQL语句

func SetInsertSqlMap

func SetInsertSqlMap(nick string, sqlMap map[string]string, dataMap map[string]interface{})

设置插入SQL映射表

func SetQuerySqlMap

func SetQuerySqlMap(nick string, sqlMap map[string]string, dataMap map[string]interface{})

设置查询SQL映射表

func SetRemoveSqlMap

func SetRemoveSqlMap(nick string, sqlMap map[string]string, dataMap map[string]interface{})

设置删除SQL映射表

func SetSaveSqlMap

func SetSaveSqlMap(nick string, sqlMap map[string]string, dataMap map[string]interface{})

设置保存SQL映射表

func SetUpdateSqlMap

func SetUpdateSqlMap(nick string, sqlMap map[string]string, dataMap map[string]interface{})

设置更新SQL映射表

Types

type Action

type Action struct {
}

数据库动作对象

func (Action) DeleteModel

func (action Action) DeleteModel(nick string, dataMap map[string]interface{}) bool

删除模型

func (Action) GetModelData

func (action Action) GetModelData(nick string, dataMap map[string]interface{}) map[string]interface{}

查询模型

func (Action) QueryModel

func (action Action) QueryModel(nick string, dataMap map[string]interface{}) []map[string]interface{}

查询模型

func (Action) SaveModel

func (action Action) SaveModel(sqlMap map[string]string) bool

保存模型

Jump to

Keyboard shortcuts

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