tags

package
v0.0.0-...-386c639 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedType = errors.New("Unsupported type")
)

Functions

func AutoIncrTagHandler

func AutoIncrTagHandler(ctx *Context) error

AutoIncrTagHandler describes autoincr tag handler

func CacheTagHandler

func CacheTagHandler(ctx *Context) error

CacheTagHandler describes cache tag handler

func CommentTagHandler

func CommentTagHandler(ctx *Context) error

CommentTagHandler add comment to column

func CreatedTagHandler

func CreatedTagHandler(ctx *Context) error

CreatedTagHandler describes created tag handler

func DefaultTagHandler

func DefaultTagHandler(ctx *Context) error

DefaultTagHandler describes default tag handler

func DeletedTagHandler

func DeletedTagHandler(ctx *Context) error

DeletedTagHandler describes deleted tag handler

func ExtendsTagHandler

func ExtendsTagHandler(ctx *Context) error

ExtendsTagHandler describes extends tag handler

func IgnoreTagHandler

func IgnoreTagHandler(ctx *Context) error

IgnoreTagHandler describes ignored tag handler

func IndexTagHandler

func IndexTagHandler(ctx *Context) error

IndexTagHandler describes index tag handler

func LocalTagHandler

func LocalTagHandler(ctx *Context) error

LocalTagHandler describes local tag handler

func NULLTagHandler

func NULLTagHandler(ctx *Context) error

NULLTagHandler describes null tag handler

func NoCacheTagHandler

func NoCacheTagHandler(ctx *Context) error

NoCacheTagHandler describes nocache tag handler

func NotNullTagHandler

func NotNullTagHandler(ctx *Context) error

NotNullTagHandler describes notnull tag handler

func OnlyFromDBTagHandler

func OnlyFromDBTagHandler(ctx *Context) error

OnlyFromDBTagHandler describes mapping direction tag handler

func OnlyToDBTagHandler

func OnlyToDBTagHandler(ctx *Context) error

OnlyToDBTagHandler describes mapping direction tag handler

func PKTagHandler

func PKTagHandler(ctx *Context) error

PKTagHandler describes primary key tag handler

func SQLTypeTagHandler

func SQLTypeTagHandler(ctx *Context) error

SQLTypeTagHandler describes SQL Type tag handler

func UTCTagHandler

func UTCTagHandler(ctx *Context) error

UTCTagHandler describes utc tag handler

func UniqueTagHandler

func UniqueTagHandler(ctx *Context) error

UniqueTagHandler describes unique tag handler

func UpdatedTagHandler

func UpdatedTagHandler(ctx *Context) error

UpdatedTagHandler describes updated tag handler

func VersionTagHandler

func VersionTagHandler(ctx *Context) error

VersionTagHandler describes version tag handler

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

Context represents a context for xorm tag parse.

type Handler

type Handler func(ctx *Context) error

Handler describes tag handler for XORM

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewParser

func NewParser(identifier string, dialect dialects.Dialect, tableMapper, columnMapper names.Mapper, cacherMgr *caches.Manager) *Parser

func (*Parser) ClearCacheTable

func (parser *Parser) ClearCacheTable(t reflect.Type)

ClearCacheTable removes the database mapper of a type from the cache

func (*Parser) ClearCaches

func (parser *Parser) ClearCaches()

ClearCaches removes all the cached table information parsed by structs

func (*Parser) GetColumnMapper

func (parser *Parser) GetColumnMapper() names.Mapper

func (*Parser) GetTableMapper

func (parser *Parser) GetTableMapper() names.Mapper

func (*Parser) Parse

func (parser *Parser) Parse(v reflect.Value) (*schemas.Table, error)

Parse parses a struct as a table information

func (*Parser) ParseWithCache

func (parser *Parser) ParseWithCache(v reflect.Value) (*schemas.Table, error)

func (*Parser) SetColumnMapper

func (parser *Parser) SetColumnMapper(mapper names.Mapper)

func (*Parser) SetTableMapper

func (parser *Parser) SetTableMapper(mapper names.Mapper)

Jump to

Keyboard shortcuts

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