package dict

import (
	"wb/cs"
	"wb/om"
	"wb/st"
)

func GetTblCol(tabName, colName string) map[string]cs.MObject {
	queryParams := om.Params{}
	col := make(map[string]cs.MObject)
	if code, tblMaps := om.Table(tabName).QueryAll(queryParams); code == st.Success {
		for _, tblMap := range tblMaps {
			id := tblMap.GetString(colName)
			if id == "" {
				continue
			}
			col[id] = tblMap
		}
	}
	return col
}
