sorm

package module
v0.0.0-...-7df487a Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: LGPL-2.1 Imports: 10 Imported by: 0

README

sorm

SORM is a very simple orm for golang.

Documentation

Index

Constants

View Source
const SHEETNAME = "Sheet1"

Variables

This section is empty.

Functions

func FindColumn

func FindColumn(s string) string

func GenInsertSQL

func GenInsertSQL(data interface{}) (string, error)

func GetTableName

func GetTableName(data interface{}) string

func Json2xls

func Json2xls(json, filename string) error

func Rows2Xls

func Rows2Xls(rows *sql.Rows, filename string) error

Types

type PersonDemo

type PersonDemo struct {
	Id          string    `json:"id" gorm:"column:id;primary_key"`                        //uuid
	User_id     string    `json:"guser_id" gorm:"column:guser_id"  gensql:"notnull"`      //uuid
	Age         int       `json:"age" gorm:"column:age"  gensql:"notnull"`                //int
	Weight      float32   `json:"weight" gorm:"column:weight"  gensql:"notnull"`          //float32
	Create_time time.Time `json:"create_time" gorm:"column:create_time" gensql:"notnull"` //timestamp without time zone
}

func (PersonDemo) TableName

func (PersonDemo) TableName() string

Jump to

Keyboard shortcuts

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