func DeletedTagHandler(ctx *tagContext) error {
	ctx.col.IsDeleted = true
	return nil
}
DeletedTagHandler describes deleted tag handler
package xorm
import (
	"fmt"
	"reflect"
	"strconv"
	"strings"
	"time"
	"github.com/go-xorm/core"
)
type tagContext struct {
	tagName         string
	params          []string
	preTag, nextTag string
	table           *core.Table
	col             *core.Column
	fieldValue      reflect.Value
	isIndex         bool
	isUnique        bool
	indexNames      map[string]int
	engine          *Engine
	hasCacheTag     bool
	hasNoCacheTag   bool
	ignoreNext      bool
}
type tagHandler func(ctx *tagContext) error
var (
	defaultTagHandlers = map[string]tagHandler{
		"<-":       OnlyFromDBTagHandler,
		"->":       OnlyToDBTagHandler,
		"PK":       PKTagHandler,
		"NULL":     NULLTagHandler,
		"NOT":      IgnoreTagHandler,
		"AUTOINCR": AutoIncrTagHandler,
		"DEFAULT":  DefaultTagHandler,
		"CREATED":  CreatedTagHandler,
		"UPDATED":  UpdatedTagHandler,
		"DELETED":  DeletedTagHandler,
		"VERSION":  VersionTagHandler,
		"UTC":      UTCTagHandler,
		"LOCAL":    LocalTagHandler,
		"NOTNULL":  NotNullTagHandler,
		"INDEX":    IndexTagHandler,
		"UNIQUE":   UniqueTagHandler,
		"CACHE":    CacheTagHandler,
		"NOCACHE":  NoCacheTagHandler,
		"COMMENT":  CommentTagHandler,
	}
)
func init() {
	for k := range core.SqlTypes {
		defaultTagHandlers[k] = SQLTypeTagHandler
	}
}
func IgnoreTagHandler(ctx *tagContext) error {
	return nil
}
func OnlyFromDBTagHandler(ctx *tagContext) error {
	ctx.col.MapType = core.ONLYFROMDB
	return nil
}
func OnlyToDBTagHandler(ctx *tagContext) error {
	ctx.col.MapType = core.ONLYTODB
	return nil
}
func PKTagHandler(ctx *tagContext) error {
	ctx.col.IsPrimaryKey = true
	ctx.col.Nullable = false
	return nil
}
func NULLTagHandler(ctx *tagContext) error {
	ctx.col.Nullable = (strings.ToUpper(ctx.preTag) != "NOT")
	return nil
}
func NotNullTagHandler(ctx *tagContext) error {
	ctx.col.Nullable = false
	return nil
}
func AutoIncrTagHandler(ctx *tagContext) error {
	ctx.col.IsAutoIncrement = true
	return nil
}
func DefaultTagHandler(ctx *tagContext) error {
	if len(ctx.params) > 0 {
		ctx.col.Default = ctx.params[0]
	} else {
		ctx.col.Default = ctx.nextTag
		ctx.ignoreNext = true
	}
	return nil
}
func CreatedTagHandler(ctx *tagContext) error {
	ctx.col.IsCreated = true
	return nil
}
func VersionTagHandler(ctx *tagContext) error {
	ctx.col.IsVersion = true
	ctx.col.Default = "1"
	return nil
}
func UTCTagHandler(ctx *tagContext) error {
	ctx.col.TimeZone = time.UTC
	return nil
}
func LocalTagHandler(ctx *tagContext) error {
	if len(ctx.params) == 0 {
		ctx.col.TimeZone = time.Local
	} else {
		var err error
		ctx.col.TimeZone, err = time.LoadLocation(ctx.params[0])
		if err != nil {
			return err
		}
	}
	return nil
}
func UpdatedTagHandler(ctx *tagContext) error {
	ctx.col.IsUpdated = true
	return nil
}