code: func dataForTableConstraints(schemas []*model.DBInfo) [][]types.Datum {
  	var rows [][]types.Datum
  	for _, schema := range schemas {
  		for _, tbl := range schema.Tables {
  			if tbl.PKIsHandle {
  				record := types.MakeDatums(
  					catalogVal,           // CONSTRAINT_CATALOG
  					schema.Name.O,        // CONSTRAINT_SCHEMA
  					mysql.PrimaryKeyName, // CONSTRAINT_NAME
  					schema.Name.O,        // TABLE_SCHEMA
  					tbl.Name.O,           // TABLE_NAME
  					primaryKeyType,       // CONSTRAINT_TYPE
  				)
  				rows = append(rows, record)
  			}
  
  			for _, idx := range tbl.Indices {
  				var cname, ctype string
  				if idx.Primary {
  					cname = mysql.PrimaryKeyName
  					ctype = primaryKeyType
  				} else if idx.Unique {
  					cname = idx.Name.O
  					ctype = uniqueKeyType
  				} else {
  					// The index has no constriant.
  					continue
  				}
  				record := types.MakeDatums(
  					catalogVal,    // CONSTRAINT_CATALOG
  					schema.Name.O, // CONSTRAINT_SCHEMA
  					cname,         // CONSTRAINT_NAME
  					schema.Name.O, // TABLE_SCHEMA
  					tbl.Name.O,    // TABLE_NAME
  					ctype,         // CONSTRAINT_TYPE
  				)
  				rows = append(rows, record)
  			}
  		}
  	}
  	return rows
  }
docs: // dataForTableConstraints constructs data for table information_schema.constraints.See https://dev.mysql.com/doc/refman/5.7/en/table-constraints-table.html