generate

package
v0.0.0-...-31a32bb Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 3 Imported by: 0

README

  • 自动生成的model
  • 各种层次中需要用到的model

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB, _ = gomysql.CreatePool(&gomysql.Config{
	Addr:     "127.0.0.1",
	Port:     "3306",
	UserName: "root",
	Password: "",
	Database: "im",
})

DB 调试:tail -f /var/log/mysql/general_query.log

Functions

This section is empty.

Types

type Querier

type Querier interface {
	// GetByID SELECT * FROM @@table WHERE id=@id
	GetByID(id int64) (*gen.T, error) // GetByID query data by id and return it as *struct*
}

Querier Dynamic SQL https://gorm.io/zh_CN/gen/dynamic_sql.html 定义一些通用的查询SQL:每个数据表在生成代码时,都会生成以下SQL的查询方法

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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