// Match returns an error showing the first detected difference between mci
// and other or nil if they are identical
Match returns an error showing the first detected difference between mci
and other or nil if they are identical
// Match returns an error showing the first detected difference between mci // and other or nil if they are identical
func (mci MultiColInfo) Match(other MultiColInfo) error {
	if len(mci.info) != len(other.info) {
		return fmt.Errorf("Differing numbers of columns: %d != %d",
			len(mci.info), len(other.info))
	}
	for i, ci := range mci.info {
		if ci.colType != other.info[i].colType {
			return fmt.Errorf("%s has a different type: %s != %s",
				mci.ColDesc(i), ci.colType, other.info[i].colType)
		}
		if ci.name != other.info[i].name {
			return fmt.Errorf("%s has a different name: %q != %q",
				mci.ColDesc(i), ci.name, other.info[i].name)
		}
	}
	for i, idx := range mci.valIdx {
		if idx != other.valIdx[i] {
			return fmt.Errorf("%s has a different value idx: %d != %d",
				mci.ColDesc(i), idx, other.valIdx[i])
		}
	}
	return nil
}
func ( mci MultiColInfo ) Match ( other MultiColInfo ) error { if len ( mci . info ) != len ( other . info ) { return fmt . Errorf ( " " , len ( mci . info ) , len ( other . info ) ) } for i , ci := range mci . info { if ci . colType != other . info [ i ] . colType { return fmt . Errorf ( " " , mci . ColDesc ( i ) , ci . colType , other . info [ i ] . colType ) } if ci . name != other . info [ i ] . name { return fmt . Errorf ( " " , mci . ColDesc ( i ) , ci . name , other . info [ i ] . name ) } } for i , idx := range mci . valIdx { if idx != other . valIdx [ i ] { return fmt . Errorf ( " " , mci . ColDesc ( i ) , idx , other . valIdx [ i ] ) } } return nil }
Match returns an error showing the first detected difference between mci
and other or nil if they are identical
Match returns an error showing the first detected difference between mci and other or nil if they are identical