shared/generate/db/mapping.go
func (m *Mapping) FilterFieldByName(name string) (*Field, error) {
	field := m.FieldByName(name)
	if field == nil {
		return nil, fmt.Errorf("Unknown filter %q", name)
	}

	if field.Type.Code != TypeColumn {
		return nil, fmt.Errorf("Unknown filter %q not a column", name)
	}

	return field, nil
}
func (m *Mapping) FilterFieldByName(name string) (*Field, error) {
	field := m.FieldByName(name)
	if field == nil {
		return nil, fmt.Errorf("Unknown filter %q", name)
	}

	if field.Type.Code != TypeColumn {
		return nil, fmt.Errorf("Unknown filter %q not a column", name)
	}

	return field, nil
}
func ( m * Mapping ) FilterFieldByName ( name string ) ( * Field , error ) { field := m . FieldByName ( name ) if field == nil { return nil , fmt . Errorf ( " " , name ) } if field . Type . Code != TypeColumn { return nil , fmt . Errorf ( " " , name ) } return field , nil }
// FilterFieldByName returns the field with the given name if that field can be
// used as query filter, an error otherwise.
FilterFieldByName returns the field with the given name if that field can be used as query filter an error otherwise .