code: func (session *Session) isIndexExist2(tableName string, cols []string, unique bool) (bool, error) {
  	indexes, err := session.engine.dialect.GetIndexes(tableName)
  	if err != nil {
  		return false, err
  	}
  
  	for _, index := range indexes {
  		if sliceEq(index.Cols, cols) {
  			if unique {
  				return index.Type == core.UniqueType, nil
  			}
  			return index.Type == core.IndexType, nil
  		}
  	}
  	return false, nil
  }
docs: // find if index is exist according cols