orm

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Undefined = ""
)

Variables

This section is empty.

Functions

func GetDataForCreate added in v1.2.0

func GetDataForCreate(obj interface{}) ([]Column, []Argument)

func GetDataForSelect added in v1.2.0

func GetDataForSelect(obj interface{}) ([]Column, JoinCond)

func GetDataForUpdate added in v1.2.0

func GetDataForUpdate(obj interface{}) map[Column]Argument

func GetTableNameWithAlias added in v1.2.1

func GetTableNameWithAlias(obj interface{}) string

GetTableNameWithAlias - return string: `table_name` as `alias_name` (if alias_name not set, return `table_name` as `table_name`)

func InitMetaTagInfoCache added in v1.2.0

func InitMetaTagInfoCache(objs ...interface{})

Types

type Alias

type Alias = string

func GetTableAlias added in v1.2.1

func GetTableAlias(obj interface{}) Alias

GetTableAlias - return alias of table, if not set, return table name

type Argument

type Argument = interface{}

type Column

type Column = string

type JoinCond added in v1.2.2

type JoinCond = string

type MetaDTO added in v1.2.0

type MetaDTO = struct {
	ColsMap    map[ormUseInTagValue][]Column
	JoinCond   JoinCond
	TableName  Table
	TableAlias Alias
	StructName Typ
}

func GetMetaDTO added in v1.2.0

func GetMetaDTO(obj interface{}) *MetaDTO

type Table added in v1.2.0

type Table = string

func GetTableName added in v1.2.0

func GetTableName(obj interface{}) Table

GetTableName - return table name

type Typ added in v1.2.0

type Typ = string

Jump to

Keyboard shortcuts

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