code: func (tl TypeLoader) LoadRelkind(args *ArgType, relType RelType) (map[string]*Type, error) {
  	var err error
  
  	// load tables
  	tableList, err := tl.TableList(args.DB, args.Schema, tl.Relkind(relType))
  	if err != nil {
  		return nil, err
  	}
  
  	// tables
  	tableMap := make(map[string]*Type)
  	for _, ti := range tableList {
  		// create template
  		typeTpl := &Type{
  			Name:    SingularizeIdentifier(ti.TableName),
  			Schema:  args.Schema,
  			RelType: relType,
  			Fields:  []*Field{},
  			Table:   ti,
  		}
  
  		// process columns
  		err = tl.LoadColumns(args, typeTpl)
  		if err != nil {
  			return nil, err
  		}
  
  		tableMap[ti.TableName] = typeTpl
  	}
  
  	// generate table templates
  	for _, t := range tableMap {
  		err = args.ExecuteTemplate(TypeTemplate, t.Name, "", t)
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	return tableMap, nil
  }
docs: // LoadRelkind loads a schema table/view definition.