xorm: xorm.io/xorm/tags Index | Files

package tags

import "xorm.io/xorm/tags"


Package Files

parser.go tag.go


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

func AutoIncrTagHandler Uses

func AutoIncrTagHandler(ctx *Context) error

AutoIncrTagHandler describes autoincr tag handler

func CacheTagHandler Uses

func CacheTagHandler(ctx *Context) error

CacheTagHandler describes cache tag handler

func CommentTagHandler Uses

func CommentTagHandler(ctx *Context) error

CommentTagHandler add comment to column

func CreatedTagHandler Uses

func CreatedTagHandler(ctx *Context) error

CreatedTagHandler describes created tag handler

func DefaultTagHandler Uses

func DefaultTagHandler(ctx *Context) error

DefaultTagHandler describes default tag handler

func DeletedTagHandler Uses

func DeletedTagHandler(ctx *Context) error

DeletedTagHandler describes deleted tag handler

func ExtendsTagHandler Uses

func ExtendsTagHandler(ctx *Context) error

ExtendsTagHandler describes extends tag handler

func IgnoreTagHandler Uses

func IgnoreTagHandler(ctx *Context) error

IgnoreTagHandler describes ignored tag handler

func IndexTagHandler Uses

func IndexTagHandler(ctx *Context) error

IndexTagHandler describes index tag handler

func LocalTagHandler Uses

func LocalTagHandler(ctx *Context) error

LocalTagHandler describes local tag handler

func NULLTagHandler Uses

func NULLTagHandler(ctx *Context) error

NULLTagHandler describes null tag handler

func NoCacheTagHandler Uses

func NoCacheTagHandler(ctx *Context) error

NoCacheTagHandler describes nocache tag handler

func NotNullTagHandler Uses

func NotNullTagHandler(ctx *Context) error

NotNullTagHandler describes notnull tag handler

func OnlyFromDBTagHandler Uses

func OnlyFromDBTagHandler(ctx *Context) error

OnlyFromDBTagHandler describes mapping direction tag handler

func OnlyToDBTagHandler Uses

func OnlyToDBTagHandler(ctx *Context) error

OnlyToDBTagHandler describes mapping direction tag handler

func PKTagHandler Uses

func PKTagHandler(ctx *Context) error

PKTagHandler describes primary key tag handler

func SQLTypeTagHandler Uses

func SQLTypeTagHandler(ctx *Context) error

SQLTypeTagHandler describes SQL Type tag handler

func UTCTagHandler Uses

func UTCTagHandler(ctx *Context) error

UTCTagHandler describes utc tag handler

func UniqueTagHandler Uses

func UniqueTagHandler(ctx *Context) error

UniqueTagHandler describes unique tag handler

func UpdatedTagHandler Uses

func UpdatedTagHandler(ctx *Context) error

UpdatedTagHandler describes updated tag handler

func VersionTagHandler Uses

func VersionTagHandler(ctx *Context) error

VersionTagHandler describes version tag handler

type Context Uses

type Context struct {
    // contains filtered or unexported fields

Context represents a context for xorm tag parse.

type Handler Uses

type Handler func(ctx *Context) error

Handler describes tag handler for XORM

type Parser Uses

type Parser struct {
    // contains filtered or unexported fields

func NewParser Uses

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

func (*Parser) ClearCacheTable Uses

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

ClearCacheTable removes the database mapper of a type from the cache

func (*Parser) ClearCaches Uses

func (parser *Parser) ClearCaches()

ClearCaches removes all the cached table information parsed by structs

func (*Parser) GetColumnMapper Uses

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

func (*Parser) GetTableMapper Uses

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

func (*Parser) Parse Uses

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

Parse parses a struct as a table information

func (*Parser) ParseWithCache Uses

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

func (*Parser) SetColumnMapper Uses

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

func (*Parser) SetTableMapper Uses

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

Package tags imports 13 packages (graph) and is imported by 3 packages. Updated 2021-01-21. Refresh now. Tools for package owners.