gengo_mysql_query

package
v0.0.0-...-01f7578 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MysqlTimestampTracker_Unknown = ""
	MysqlTimestampTracker_Time    = "time.Time"
	MysqlTimestampTracker_TimePtr = "*time.Time"
	MysqlTimestampTracker_Int     = "int"
	MysqlTimestampTracker_IntPtr  = "*int"
)

Variables

This section is empty.

Functions

func Generate

func Generate(inputFile, modelName string, outputDir string) error

Types

type GoField

type GoField struct {
	Name string
	Type string
	Tag  string
}

type MysqlModel

type MysqlModel struct {
	Name          string
	TableName     string
	PrimaryKeys   []GoField
	IsCreatedAt   bool
	CreatedAtType MysqlTimestampTrackerType
	IsUpdatedAt   bool
	UpdatedAtType MysqlTimestampTrackerType
}

func (MysqlModel) GetName

func (model MysqlModel) GetName() string

func (MysqlModel) GetPrimaryKeyAsQueryStmt

func (model MysqlModel) GetPrimaryKeyAsQueryStmt() string

func (MysqlModel) GetPrimaryKeyAsString

func (model MysqlModel) GetPrimaryKeyAsString(prefix, suffix, delimiter string, toLower bool, withGoType bool) string

func (MysqlModel) HasPrimaryKey

func (model MysqlModel) HasPrimaryKey() bool

func (MysqlModel) NeedImportTime

func (model MysqlModel) NeedImportTime() bool

type MysqlTimestampTrackerType

type MysqlTimestampTrackerType string

func NewMysqlTimestampTrackerType

func NewMysqlTimestampTrackerType(in string) MysqlTimestampTrackerType

Jump to

Keyboard shortcuts

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