You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: table.go
    path of file: ./repos/go-doudou/cmd/internal/ddl/table
    
    the code of the file until where you have to start completion: package table

import (
	"fmt"
	"github.com/iancoleman/strcase"
	"github.com/pkg/errors"
	"github.com/unionj-cloud/go-doudou/v2/toolkit/astutils"
	"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/columnenum"
	"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/extraenum"
	"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/keyenum"
	"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/nullenum"
	"github.com/unionj-cloud/go-doudou/v2/cmd/internal/ddl/sortenum"
	"github.com/unionj-cloud/go-doudou/v2/toolkit/stringutils"
	"github.com/unionj-cloud/go-doudou/v2/toolkit/templateutils"
	"regexp"
	"sort"
	"strconv"
	"strings"
)

const (
	now = "CURRENT_TIMESTAMP"
)

// IndexItems slice type alias for IndexItem
type IndexItems []IndexItem

// IndexItem define an index item
type IndexItem struct {
	Unique bool
	Name   string
	Column string
	Order  int
	Sort   sortenum.Sort
}

// Len return length of IndexItems
func (it IndexItems) Len() int {
	return len(it)
}

// Less define asc or desc order
func (it IndexItems) Less(i, j int) bool {
	return it[i].Order < it[j].Order
}

// Swap change position 
    
func NewFieldFromColumn(col Column) astutils.FieldMeta {
	tag := "dd:"
	var feats []string
	if col.Pk {
		feats = append(feats, "pk")
	}
	if col.Autoincrement {
		feats = append(feats, "auto")
	}
	goType := toGoType(col.Type, col.Nullable)
	if col.Nullable && !strings.HasPrefix(goType, "*") {
		feats = append(feats, "null")
	}
	if stringutils.IsNotEmpty(string(col.Type)) {
		feats = append(feats, fmt.Sprintf("type:%s", string(col.Type)))
	}
	if stringutils.IsNotEmpty(col.Default) {
		val := col.Default
		re := regexp.MustCompile(`^\(.+\)$`)
		var defaultClause string
		if strings.ToUpper(val) == "CURRENT_TIMESTAMP" || re.MatchString(val) {
			defaultClause = fmt.Sprintf("default:%s", val)
		} else {
			defaultClause = fmt.Sprintf("default:'%s'", val)
		}
		feats = append(feats, defaultClause)
	}
	if stringutils.IsNotEmpty(string(col.Extra)) {
		feats = append(feats, fmt.Sprintf("extra:%s", string(col.Extra)))
	}
	for _, idx := range col.Indexes {
		var indexClause string
		if idx.Name == "PRIMARY" {
			continue
		}
		if idx.Unique {
			indexClause = "unique:"
		} else {
			indexClause = "index:"
		}
		indexClause += fmt.Sprintf("%s,%d,%s", idx.Name, idx.Order, string(idx.Sort))
		feats = append(feats, indexClause)
	}
	if stringutils.IsNotEmpty(col.Fk.Constraint) {
		feats = append(feats, fmt.Sprintf("fk:%s,%s,%s,%s", col.Fk.ReferencedTable, col.Fk.ReferencedCol, col.Fk.Constraint, col.Fk.FullRule))
	}
	return astutils.FieldMeta{
		Name: strcase.ToCamel(col.Name),
		Type: goType,
		Tag:  fmt.Sprintf(`%s"%s"`, tag, strings.Join(feats, ";")),
	}
}