orm

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetColNames

func GetColNames(modelPtr interface{}, tagName string) ([]string, error)

GetColNames 获取列名列表, modelPtr为数据对象的指针,tagName为成员描述符(即,"db", "gorm"等)

func GetColumns

func GetColumns(modelPtr interface{}) ([]interface{}, error)

GetColumns 获取列字段指针

func Query

func Query(ctx context.Context, db *sql.DB, sql string, modelPtr interface{}) ([]interface{}, error)

Query 执行sql语句,modelPtr为数据对象的指针

Types

This section is empty.

Jump to

Keyboard shortcuts

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